Package com.google.gwt.visualization.client

Examples of com.google.gwt.visualization.client.DataTable


    options.setHeight(40);
    options.setShowAxisLines(false);
    options.setShowValueLabels(false);
    options.setLabelPosition("left");

    DataTable data = DataTable.create();

    data.addColumn(ColumnType.NUMBER, "Revenue");
    data.addColumn(ColumnType.NUMBER, "Licenses");
    data.addRows(10);
    data.setValue(0, 0, 435);
    data.setValue(1, 0, 438);
    data.setValue(2, 0, 512);
    data.setValue(3, 0, 460);
    data.setValue(4, 0, 491);
    data.setValue(5, 0, 487);
    data.setValue(6, 0, 552);
    data.setValue(7, 0, 511);
    data.setValue(8, 0, 505);
    data.setValue(9, 0, 509);

    data.setValue(0, 1, 132);
    data.setValue(1, 1, 131);
    data.setValue(2, 1, 137);
    data.setValue(3, 1, 142);
    data.setValue(4, 1, 140);
    data.setValue(5, 1, 139);
    data.setValue(6, 1, 147);
    data.setValue(7, 1, 146);
    data.setValue(8, 1, 151);
    data.setValue(9, 1, 149);

    widget = new ImageSparklineChart(data, options);
  }
View Full Code Here


    AxisOptions vAxisOptions = AxisOptions.create();
    vAxisOptions.setMinValue(0);
    vAxisOptions.setMaxValue(2000);
    options.setVAxisOptions(vAxisOptions);

    DataTable data = Showcase.getCompanyPerformanceWithNulls();
    LineChart viz = new LineChart(data, options);

    Label status = new Label();
    Label onMouseOverAndOutStatus = new Label();
    viz.addSelectHandler(new SelectionDemo(viz, status));
View Full Code Here

    options.setWidth(450);
    options.setShowLegend(false);
    options.setColors(0xFF8747, 0xFFB581, 0xc06000);
    options.setRegion("world");

    final DataTable dataTable = DataTable.create();     
    dataTable.addRows(7);
    dataTable.addColumn(ColumnType.STRING, "ADDRESS", "address");
    dataTable.setValue(0, 0, "Israel");
    dataTable.setValue(1, 0, "United States");
    dataTable.setValue(2, 0, "Germany");
    dataTable.setValue(3, 0, "Brazil");
    dataTable.setValue(4, 0, "Canada");
    dataTable.setValue(5, 0, "France");
    dataTable.setValue(6, 0, "RU");
   
    final GeoMap geo = new GeoMap(dataTable, options);
    return geo;
  }
View Full Code Here

   * (see ajax_loader.html).
   */
  public void testAComboChart() {
    loadApi(new Runnable() {
      public void run() {
        DataTable data = createDailyActivities();

        // Create a bar chart for each of the series.
        Options options = ComboChart.createComboOptions();
        options.setWidth(400);
        options.setHeight(240);
View Full Code Here

    @SuppressWarnings("unused")
    int year, month, day;
    Options options = Options.create();
    options.setDisplayAnnotations(true);

    DataTable data = DataTable.create();
    data.addColumn(ColumnType.DATE, "Date");
    data.addColumn(ColumnType.NUMBER, "Sold Pencils");
    data.addColumn(ColumnType.STRING, "title1");
    data.addColumn(ColumnType.STRING, "text1");
    data.addColumn(ColumnType.NUMBER, "Sold Pens");
    data.addColumn(ColumnType.STRING, "title2");
    data.addColumn(ColumnType.STRING, "text2");
    data.addRows(6);
    try {
      data.setValue(0, 0, new Date(year = 2008 - 1900, month = 1, day = 1));
      data.setValue(1, 0, new Date(year = 2008 - 1900, month = 1, day = 2));
      data.setValue(2, 0, new Date(year = 2008 - 1900, month = 1, day = 3));
      data.setValue(3, 0, new Date(year = 2008 - 1900, month = 1, day = 4));
      data.setValue(4, 0, new Date(year = 2008 - 1900, month = 1, day = 5));
      data.setValue(5, 0, new Date(year = 2008 - 1900, month = 1, day = 6));
    } catch (JavaScriptException ex) {
      GWT.log("Error creating data table - Date bug on mac?", ex);
    }
    data.setValue(0, 1, 30000);
    data.setValue(0, 4, 40645);
    data.setValue(1, 1, 14045);
    data.setValue(1, 4, 20374);
    data.setValue(2, 1, 55022);
    data.setValue(2, 4, 50766);
    data.setValue(3, 1, 75284);
    data.setValue(3, 4, 14334);
    data.setValue(3, 5, "Out of Stock");
    data.setValue(3, 6, "Ran out of stock on pens at 4pm");
    data.setValue(4, 1, 41476);
    data.setValue(4, 2, "Bought 200k pens");
    data.setValue(4, 4, 66467);
    data.setValue(5, 1, 33322);
    data.setValue(5, 4, 39463);

    status.setText("'Ready' event was not yet fired");
    chart = new AnnotatedTimeLine(data, options, "700px", "240px");

    widget.add(chart);
View Full Code Here

    options.setLineWidth(5);
    options.setMapType(MapVisualization.Type.HYBRID);
    options.setShowLine(true);
    options.setShowTip(true);

    DataTable data = DataTable.create();
    data.addColumn(ColumnType.NUMBER, "Lat");
    data.addColumn(ColumnType.NUMBER, "Lon");
    data.addColumn(ColumnType.STRING, "Name");
    data.addRows(4);
    data.setValue(0, 0, 37.4232);
    data.setValue(0, 1, -122.0853);
    data.setValue(0, 2, "Work");
    data.setValue(1, 0, 37.4289);
    data.setValue(1, 1, -122.1697);
    data.setValue(1, 2, "University");
    data.setValue(2, 0, 37.6153);
    data.setValue(2, 1, -122.3900);
    data.setValue(2, 2, "Airport");
    data.setValue(3, 0, 37.4422);
    data.setValue(3, 1, -122.1731);
    data.setValue(3, 2, "Shopping");
   
    widget = new MapVisualization(data, options, "400px", "300px");
  }
View Full Code Here

    options.setWidth(120);
    options.setHeight(40);
    options.setTitle("Reveneues By Country");

    DataTable data = DataTable.create();

    data.addColumn(ColumnType.STRING, "Label");
    data.addColumn(ColumnType.NUMBER, "Value");
    data.addRows(4);
    data.setValue(0, 0, "France");
    data.setValue(1, 0, "Germany");
    data.setValue(2, 0, "USA");
    data.setValue(3, 0, "Poland");
    data.setCell(0, 1, 10, "$10,000", null);
    data.setCell(1, 1, 30, "$30,000", null);
    data.setCell(2, 1, 20, "$20,000", null);
    data.setCell(3, 1, 7.5, "$7,500", null);

    widget = new Visualization<AbstractDrawOptions>(data, options) {
      @Override
      protected native JavaScriptObject createJso(Element div) /*-{
        return new $wnd.PilesOfMoney(div);
View Full Code Here

*/
public class OptionsTest extends VisualizationTest {
  public void testOptions() {
    loadApi(new Runnable() {
      public void run() {
        DataTable data = createDailyActivities();

        // Create a minimal pie chart.
        PieOptions pieOptions = PieChart.createPieOptions();
        Options options = pieOptions;
        // Common options
View Full Code Here

        this.chart = new OrgChart(createData(dialog), createOptions(dialog));
    }

    protected DataTable createData(final Dialog dialog)
    {
        DataTable dataTable = DataTable.create();
        dataTable.addColumn(STRING, "id");
        dataTable.addColumn(STRING, "parent");
        dataTable.addColumn(STRING, "tooltip");

        OrgChartVisitor visitor = new OrgChartVisitor(dataTable);
        dialog.getInterfaceModel().accept(visitor);

        return dataTable;
View Full Code Here

        this.chart = new OrgChart(createData(dialog), createOptions(dialog));
    }

    protected DataTable createData(final Dialog dialog)
    {
        DataTable dataTable = DataTable.create();
        dataTable.addColumn(STRING, "id");
        dataTable.addColumn(STRING, "parent");
        dataTable.addColumn(STRING, "tooltip");

        OrgChartVisitor visitor = new OrgChartVisitor(dataTable);
        dialog.getInterfaceModel().accept(visitor);

        return dataTable;
View Full Code Here

TOP

Related Classes of com.google.gwt.visualization.client.DataTable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.