Example usage for com.google.gwt.visualization.client.formatters ColorFormat format

List of usage examples for com.google.gwt.visualization.client.formatters ColorFormat format

Introduction

In this page you can find the example usage for com.google.gwt.visualization.client.formatters ColorFormat format.

Prototype

public final native void format(DataTable data, int columnIndex) ;

Source Link

Usage

From source file:edu.cudenver.bios.glimmpse.client.panels.guided.EffectSizeBarChart.java

License:Open Source License

private AbstractDataTable createTable() {
    //DataTable data = DataTable.create();
    data.addColumn(ColumnType.STRING, "Label");
    data.addColumn(ColumnType.NUMBER, "Difference");
    data.addRows(4);//  w  w  w .  j  a v  a  2  s.  c  o  m
    data.setValue(0, 0, "M,Aggggggggggggggggggggggggggggggggg");
    data.setValue(0, 1, 1);
    data.setValue(1, 0, "M,B");
    data.setValue(1, 1, 2);
    data.setValue(2, 0, "F,A");
    data.setValue(2, 1, 2);
    data.setValue(3, 0, "F,B");
    data.setValue(3, 1, 1);

    ColorFormat format = ColorFormat.create();
    format.addRange(-1, 2000, "white", "yellow");
    format.format(data, 1);

    return data;
}