Java GChart文本颜色和轴标签
我在我的web应用程序中使用GChart,找不到任何关于改变X轴和Y轴上文本颜色的信息。我的图表显示在StackPanel中的水平面板中。这是我的GChart代码,而不是它的显示位置:Java GChart文本颜色和轴标签,java,gwt,Java,Gwt,我在我的web应用程序中使用GChart,找不到任何关于改变X轴和Y轴上文本颜色的信息。我的图表显示在StackPanel中的水平面板中。这是我的GChart代码,而不是它的显示位置: public class ChartTuple extends GChart { public ChartTuple() { super(); setChartTitle("<b></b>"); setChartSize(400,300); addCurve
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);
} }
public类ChartTuple扩展了GChart{
公共图表组(){
超级();
setChartTitle(“”);
设置图表大小(400300);
添加曲线();
对于(双i=01.24;i<14;i++){
System.out.println(“添加曲线PT”);
getCurve().addPoint(i,i);
}
getCurve().getSymbol().setSymbolType(SymbolType.VBAR_SOUTH);
getCurve().getSymbol().setBackgroundColor(“红色”);
getCurve().getSymbol().setBorderColor(“灰色”);
getCurve().getSymbol().setModelWidth(0.5);
getXAxis().setAxisLabel(
“延迟分布(%objects,时间单位mm:ss)”;
getXAxis().setHasGridlines(false);
getYAxis().setAxisLabel(“”);
getYAxis().setHasGridlines(true);
addStyleName(“图表文本”);
System.out.println(getCurve());
System.out.println(this.toString());
setVisible(真);
} }
非常感谢以下代码是如何更改X Y轴标签的颜色
getXAxis().setTickLabelFontColor("white");
getYAxis().setTickLabelFontColor("white");