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

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

Introduction

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

Prototype

public final native void addRange(double from, double to, String color, String bgcolor) ;

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  .com
    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;
}