我在我的web应用程序中使用GChart,但找不到任何有关在X和Y轴上更改文本颜色的信息。我的图表显示在StackPanel的HorizontalPanel中。以下是我的GChart代码,而不是它显示的位置:
public class ChartTuple extends GChart {
public ChartTuple() {
super();
setChartTitle("<b></b>");
setChartSize(400,300);
addCurve();
for (double i = 01.24; i < 14; i++) {
System.out.println("Adding curve PT");
getCurve().addPoint(i, i);
}
getCurve().getSymbol().setSymbolType(SymbolType.VBAR_SOUTH);
getCurve().getSymbol().setBackgroundColor("red");
getCurve().getSymbol().setBorderColor("gray");
getCurve().getSymbol().setModelWidth(0.5);
getXAxis().setAxisLabel(
"<b>Latency Distribution (% objects, time in mm:ss)</b>");
getXAxis().setHasGridlines(false);
getYAxis().setAxisLabel("");
getYAxis().setHasGridlines(true);
addStyleName("chart-text");
System.out.println(getCurve());
System.out.println(this.toString());
setVisible(true);
} }非常感谢
发布于 2012-09-08 00:07:27
下面的代码说明了如何更改X、Y轴标签的颜色。
getXAxis().setTickLabelFontColor("white");
getYAxis().setTickLabelFontColor("white");https://stackoverflow.com/questions/11563192
复制相似问题