GChartExample00c.java :  » GWT » clientsidegchart » com » googlecode » gchart » gcharttestapp » client » Java Open Source

Java Open Source » GWT » clientsidegchart 
clientsidegchart » com » googlecode » gchart » gcharttestapp » client » GChartExample00c.java
package com.googlecode.gchart.gcharttestapp.client;
import com.googlecode.gchart.client.GChart;
/**
 * Defines a line-plot of x*x vs. x, with canvas-based, solid
 * connecting lines (requires use of setCanvasFactory in your
 * application module to tell GChart how to access an external
 * canvas-based GWT library of your choice)
 */
public class GChartExample00c extends GChart {
  GChartExample00c() {
     setChartTitle("<b>x<sup>2</sup> vs x</b>");
     setChartSize(150, 150);
     addCurve();
// solid, 2px thick connecting lines:
     getCurve().getSymbol().setSymbolType(SymbolType.LINE);
     getCurve().getSymbol().setFillThickness(2);
     for (int i = 0; i < 10; i++) 
       getCurve().addPoint(i,i*i);
     getCurve().setLegendLabel("x<sup>2</sup>");
     getXAxis().setAxisLabel("x");
     getYAxis().setAxisLabel("x<sup>2</sup>");
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.