Example usage for com.google.gwt.visualization.client CommonChartOptions create

List of usage examples for com.google.gwt.visualization.client CommonChartOptions create

Introduction

In this page you can find the example usage for com.google.gwt.visualization.client CommonChartOptions create.

Prototype

public static CommonChartOptions create() 

Source Link

Usage

From source file:com.google.gwt.visualization.sample.visualizationshowcase.client.MoneyDemo.java

License:Apache License

public MoneyDemo() {
    CommonChartOptions options = CommonChartOptions.create();

    options.setWidth(120);/*from w w w  . j ava 2s.c o m*/
    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);
                                                                 }-*/;
    };
}