package com.googlecode.gchart.gcharttestapp.client;
import com.googlecode.gchart.client.GChart;
/**
* Defines a bar-chart of x*x vs. x, with gridlines.
*/
public class GChartExample01b extends GChart {
GChartExample01b() {
setChartTitle("x2 vs x");
setChartSize(150, 150);
addCurve();
for (int i = 0; i < 10; i++)
getCurve().addPoint(i,i*i);
getCurve().setLegendLabel("x2");
getCurve().getSymbol().setSymbolType(SymbolType.VBAR_SOUTH);
getCurve().getSymbol().setBackgroundColor("red");
getCurve().getSymbol().setBorderColor("black");
getCurve().getSymbol().setModelWidth(1.0);
getCurve().getSymbol().setHoverAnnotationSymbolType(SymbolType.ANCHOR_MOUSE);
getXAxis().setAxisLabel("x");
getXAxis().setHasGridlines(true);
getYAxis().setAxisLabel("x2");
getYAxis().setHasGridlines(true);
}
}