org.moxieapps.gwt.highcharts.client.plotOptions
Class DataGrouping.Unit

java.lang.Object
  extended by com.google.gwt.json.client.JSONValue
      extended by com.google.gwt.json.client.JSONArray
          extended by org.moxieapps.gwt.highcharts.client.plotOptions.DataGrouping.Unit
Enclosing class:
DataGrouping

public static class DataGrouping.Unit
extends com.google.gwt.json.client.JSONArray

Basic class to support DataGrouping. This class should not be instantiated on its own, but as a parameter of DataGrouping.setUnits(DataGrouping.Unit...)

Sample usage:

     chart.setPlotoptions(
          new PlotOptions()
              .setDataGrouping(
                  new DataGrouping()
                      .setUnits(
                          new Unit("week", 1),
                          new Unit("month", 1, 2, 3, 4, 6)
                      )
              )
      );
 

Since:
1.6.0
Author:
cskowron@moxiegroup.com (Cory Skowronek)

Constructor Summary
DataGrouping.Unit(String unitName, Number... intervals)
          Constructor for the Unit class.
 
Method Summary
 
Methods inherited from class com.google.gwt.json.client.JSONArray
equals, get, getJavaScriptObject, hashCode, isArray, set, size, toString
 
Methods inherited from class com.google.gwt.json.client.JSONValue
isBoolean, isNull, isNumber, isObject, isString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataGrouping.Unit

public DataGrouping.Unit(String unitName,
                         Number... intervals)
Constructor for the Unit class. One should use only this constructor and not the default Unit().

Sample usage:

      new Unit("millisecond", 1, 2, 5, 10, 20, 25, 50, 100, 200, 500)
 

This will produce the following:

      [['millisecond', // unit name
      [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]] // allowed multiples
 

Parameters:
unitName - The Name of the unit for which you wish to set intervals.
intervals - The intervals that the data is allowed to be grouped in
See Also:
DataGrouping.setUnits(org.moxieapps.gwt.highcharts.client.plotOptions.DataGrouping.Unit...)


Copyright © 2015. All Rights Reserved.