org.moxieapps.gwt.highcharts.client
Class ColorAxis

java.lang.Object
  extended by org.moxieapps.gwt.highcharts.client.Configurable<ColorAxis>
      extended by org.moxieapps.gwt.highcharts.client.ColorAxis

public class ColorAxis
extends Configurable<ColorAxis>

Provides access to an object that can be used to configure and manage the color axis of the chart. Visually, the color axis will appear as a gradient or as separate items inside the legend, depending on whether the axis is scalar or based on data classes.. A scalar color axis is represented by a gradient. The colors either range between the minColor and the maxColor, or for more fine grained control the colors can be defined in stops. Often times, the color axis needs to be adjusted to get the right color spread for the data. In addition to stops, consider using a logarithmic axis type, or setting min and max to avoid the colors being determined by outliers. When dataClasses are used, the ranges are subdivided into separate classes like categories based on their values. This can be used for ranges between two values, but also for a true category. However, when your data is categorized, it may be as convenient to add each category to a separate series.

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

Nested Class Summary
static class ColorAxis.DataClassColor
           
static class ColorAxis.TickPosition
           
 
Constructor Summary
ColorAxis()
           
 
Method Summary
static com.google.gwt.json.client.JSONArray addStop(Number stopNumber, String stopColor)
          Convenience method for adding stops along the 'colorAxis' of a chart.
 ColorAxis setDataClassColor(ColorAxis.DataClassColor dataClassColor)
          Convenience method for setting the 'colorAxis' option of the map.
 ColorAxis setEndOnTick(Boolean endOnTick)
          Convenience method for setting the 'endOnTick' option of the map.
 ColorAxis setGridLineColor(Color gridLineColor)
          Convenience method for setting the 'gridLineColor' option of the map.
 ColorAxis setGridLineColor(String gridLineColor)
          Convenience method for setting the 'gridLineColor' option of the map.
 ColorAxis setGridLineDashStyle(PlotLine.DashStyle gridLineDashStyle)
          Convenience method for setting the 'gridLineDashStyle' option of the map.
 ColorAxis setGridLineWidth(Number gridLineWidth)
          Convenience method for setting the 'gridLineWidth' option of the map.
 ColorAxis setId(String id)
          Convenience method for setting the 'id' option of the map.
 ColorAxis setLabels(XAxisLabels labels)
          Convenience method for setting the 'labels' option of the map.
 ColorAxis setLineColor(Color lineColor)
          Convenience method for setting the 'lineColor' option of the map.
 ColorAxis setLineColor(String lineColor)
          Convenience method for setting the 'lineColor' option of the map.
 ColorAxis setLineWidth(Number lineWidth)
          Convenience method for setting the 'lineWidth' option of the map.
 ColorAxis setMarkerAnimation(Animation markerAnimation)
          Convenience method for setting the 'markerAnimation' option of the map.
 ColorAxis setMarkerAnimation(boolean markerAnimation)
          Convenience method for setting the 'markerAnimation' option of the map.
 ColorAxis setMarkerColor(Color color)
          Convenience method for setting the 'markerAnimation' option of the map.
 ColorAxis setMax(Number max)
          Convenience method for setting the 'max' option of the map.
 ColorAxis setMaxColor(Color maxColor)
          Convenience method for setting the 'maxColor' option of the map.
 ColorAxis setMaxColor(String maxColor)
          Convenience method for setting the 'maxColor' option of the map.
 ColorAxis setMaxPadding(Number maxPadding)
          Convenience method for setting the 'maxPadding' option of the map.
 ColorAxis setMin(Number min)
          Convenience method for setting the '' option of the map.
 ColorAxis setMinColor(Color minColor)
          Convenience method for setting the 'minColor' option of the map.
 ColorAxis setMinColor(String minColor)
          Convenience method for setting the 'minColor' option of the map.
 ColorAxis setMinorGridLineColor(Color minorGridLineColor)
          Convenience method for setting the 'minorGridLineColor' option of the map.
 ColorAxis setMinorGridLineColor(String minorGridLineColor)
          Convenience method for setting the 'minorGridLineColor' option of the map.
 ColorAxis setMinorGridLineDashStyle(PlotLine.DashStyle minorGridLineDashStyle)
          Convenience method for setting the 'minorGridLineDashStyle' option of the map.
 ColorAxis setMinorGridLineWidth(Number minorGridLineWidth)
          Convenience method for setting the 'minorGridLineWidth' option of the map.
 ColorAxis setMinorTickColor(Color minorTickColor)
          Convenience method for setting the 'minorTickColor' option of the map.
 ColorAxis setMinorTickColor(String minorTickColor)
          Convenience method for setting the 'minorTickColor' option of the map.
 ColorAxis setMinorTickInterval(Number minorTickInterval)
          Convenience method for setting the 'minorTickInterval' option of the map.
 ColorAxis setMinorTickInterval(String minorTickInterval)
          Convenience method for setting the 'minorTickInterval' option of the map.
 ColorAxis setMinorTickLength(Number minorTickLength)
          Convenience method for setting the 'minorTickLength' option of the map.
 ColorAxis setMinorTickPosition(ColorAxis.TickPosition minorTickPosition)
          Convenience method for setting the 'minorTickPosition' option of the colorAxis.
 ColorAxis setMinorTickWidth(Number minorTickWidth)
          Convenience method for setting the 'minorTickWidth' option of the map.
 ColorAxis setMinPadding(Number minPadding)
          Convenience method for setting the 'minPadding' option of the map.
 ColorAxis setReversed(Boolean reversed)
          Convenience method for setting the 'reversed' option of the map.
 ColorAxis setShowFirstLabel(Boolean showFirstLabel)
          Convenience method for setting the 'showFirstLabel' option of the map.
 ColorAxis setShowLastLabel(Boolean showLastLabel)
          Convenience method for setting the 'showLastLabel' option of the map.
 ColorAxis setStartOnTick(Boolean startOnTick)
          Convenience method for setting the 'startOnTick' option of the map.
 ColorAxis setStops(com.google.gwt.json.client.JSONArray... stops)
          Convenience method for setting the 'stops' option of the map.
 ColorAxis setTickColor(Color tickColor)
          Convenience method for setting the 'tickColor' option of the map.
 ColorAxis setTickColor(String tickColor)
          Convenience method for setting the 'tickColor' option of the map.
 ColorAxis setTickInterval(Number tickInterval)
          Convenience method for setting the 'tickInterval' option of the map.
 ColorAxis setTickLength(Number tickLength)
          Convenience method for setting the 'tickLength' option of the map.
 ColorAxis setTickPixelInterval(Number tickPixelInterval)
          Convenience method for setting the 'tickPixelInterval' option of the map.
 ColorAxis setTickPosition(ColorAxis.TickPosition tickPosition)
          Convenience method for setting the 'tickPosition' option of the color axis.
 ColorAxis setTickWidth(Number tickWidth)
          Convenience method for setting the 'tickWidth' option of the map.
 
Methods inherited from class org.moxieapps.gwt.highcharts.client.Configurable
getOptions, setOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorAxis

public ColorAxis()
Method Detail

setDataClassColor

public ColorAxis setDataClassColor(ColorAxis.DataClassColor dataClassColor)
Convenience method for setting the 'colorAxis' option of the map. Equivalent to:

     colorAxis.setOption("dataClassColor", "category");
 
Determines how to set each data class' color if no individual color is set. The default value, tween, computes intermediate colors between minColor and maxColor. The other possible value, category, pulls colors from the global or chart specific colors array. Defaults to tween.

Parameters:
dataClassColor - Determines how to set each dataClass' color
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setEndOnTick

public ColorAxis setEndOnTick(Boolean endOnTick)
Convenience method for setting the 'endOnTick' option of the map. Equivalent to:

     colorAxis.setOption("endOnTick", );
 
Whether to force the axis to end on a tick. Use this option with the maxPadding option to control the axis end. Defaults to true.

Parameters:
endOnTick - Whether to force the axis to end on a tick
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setGridLineColor

public ColorAxis setGridLineColor(Color gridLineColor)
Convenience method for setting the 'gridLineColor' option of the map. Equivalent to:

     colorAxis.setOption("gridLineColor", );
 
Color of the grid lines extending from the axis across the gradient. Defaults to #C0C0C0.

Parameters:
gridLineColor - Color of the grid lines
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setGridLineColor

public ColorAxis setGridLineColor(String gridLineColor)
Convenience method for setting the 'gridLineColor' option of the map. Equivalent to:

     colorAxis.setOption("gridLineColor", );
 
Color of the grid lines extending from the axis across the gradient. Defaults to #C0C0C0.

Parameters:
gridLineColor - Color of the grid lines.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setGridLineDashStyle

public ColorAxis setGridLineDashStyle(PlotLine.DashStyle gridLineDashStyle)
Convenience method for setting the 'gridLineDashStyle' option of the map. Equivalent to:

     colorAxis.setOption("gridLineDashStyle", );
 
The dash or dot style of the grid lines. For possible values, see this demonstration. Defaults to Solid.

Parameters:
gridLineDashStyle - The dash or dot style of the grid lines.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setGridLineWidth

public ColorAxis setGridLineWidth(Number gridLineWidth)
Convenience method for setting the 'gridLineWidth' option of the map. Equivalent to:

     colorAxis.setOption("gridLineWidth", );
 
The width of the grid lines extending from the axis across the gradient of a scalar color axis. Defaults to 1.

Parameters:
gridLineWidth - The width of the grid lines.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setId

public ColorAxis setId(String id)
Convenience method for setting the 'id' option of the map. Equivalent to:

     colorAxis.setOption("id", );
 
An id for the axis. This can be used after render time to get a pointer to the axis object through chart.get().

Parameters:
id - An id for the axis.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setLabels

public ColorAxis setLabels(XAxisLabels labels)
Convenience method for setting the 'labels' option of the map. Equivalent to:

     colorAxis.setOption("labels", );
 
The axis labels show the number for each tick.

Parameters:
labels - The axis labels show the number for each tick.
Returns:
A reference to this ColorAxis instance for convenient method chaining.
See Also:
XAxisLabels

setLineColor

public ColorAxis setLineColor(Color lineColor)
Convenience method for setting the 'lineColor' option of the map. Equivalent to:

     colorAxis.setOption("lineColor", );
 
The color of the line marking the axis itself. Defaults to #C0D0E0.

Parameters:
lineColor - The color of the line marking the axis.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setLineColor

public ColorAxis setLineColor(String lineColor)
Convenience method for setting the 'lineColor' option of the map. Equivalent to:

     colorAxis.setOption("lineColor", );
 
The color of the line marking the axis itself. Defaults to #C0D0E0.

Parameters:
lineColor - The color of the line marking the axis itself.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setLineWidth

public ColorAxis setLineWidth(Number lineWidth)
Convenience method for setting the 'lineWidth' option of the map. Equivalent to:

     colorAxis.setOption("lineWidth", );
 
The width of the line marking the axis itself. Defaults to 0.

Parameters:
lineWidth - The width of the line marking the axis itself.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMarkerAnimation

public ColorAxis setMarkerAnimation(Animation markerAnimation)
Convenience method for setting the 'markerAnimation' option of the map. Equivalent to:

     colorAxis.setOption("marker/animation", );
 
Animation for the marker as it moves between values. Set to false to disable animation. Defaults to { duration: 50 }

Parameters:
markerAnimation - An instance of the Animation class which provides specific options for configuring the animation
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMarkerAnimation

public ColorAxis setMarkerAnimation(boolean markerAnimation)
Convenience method for setting the 'markerAnimation' option of the map. Equivalent to:

     colorAxis.setOption("marker/animation", true);
 
Animation for the marker as it moves between values. Set to false to disable animation. Defaults to { duration: 50 }.

Parameters:
markerAnimation - Whether to allow or disable animations in color axis.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMarkerColor

public ColorAxis setMarkerColor(Color color)
Convenience method for setting the 'markerAnimation' option of the map. Equivalent to:

     colorAxis.setOption("marker/color", );
 
The color of the marker. Defaults to gray

Parameters:
color - An instance of the ColorAxis.DataClassColor class which provides specific options for setting the color of the marker.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMax

public ColorAxis setMax(Number max)
Convenience method for setting the 'max' option of the map. Equivalent to:

     colorAxis.setOption("max", );
 
The maximum value of the axis in terms of map point values. If null, the max value is automatically calculated. If the endOnTick option is true, the max value might be rounded up.

Parameters:
max - The maximum value of the axis.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMaxColor

public ColorAxis setMaxColor(Color maxColor)
Convenience method for setting the 'maxColor' option of the map. Equivalent to:

     colorAxis.setOption("maxColor", );
 
The color to represent the maximum of the color axis. Unless dataClasses or stops are set, the gradient ends at this value. If dataClasses are set, the color is based on minColor and maxColor unless a color is set for each data class, or the dataClassColor is set. Defaults to #102D4C.

Parameters:
maxColor - The color to represent the maximum of the color axis.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMaxColor

public ColorAxis setMaxColor(String maxColor)
Convenience method for setting the 'maxColor' option of the map. Equivalent to:

     colorAxis.setOption("maxColor", );
 
The color to represent the maximum of the color axis. Unless dataClasses or stops are set, the gradient ends at this value. If dataClasses are set, the color is based on minColor and maxColor unless a color is set for each data class, or the dataClassColor is set. Defaults to #102D4C.

Parameters:
maxColor - The color to represent the maximum of the color axis.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMaxPadding

public ColorAxis setMaxPadding(Number maxPadding)
Convenience method for setting the 'maxPadding' option of the map. Equivalent to:

     colorAxis.setOption("maxPadding", );
 
Padding of the max value relative to the length of the axis. A padding of 0.05 will make a 100px axis 5px longer. Defaults to 0.05.

Parameters:
maxPadding - Padding of the max value relative to the length of the axis.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMin

public ColorAxis setMin(Number min)
Convenience method for setting the '' option of the map. Equivalent to:

     colorAxis.setOption("", );
 
The minimum value of the axis in terms of map point values. If null, the min value is automatically calculated. If the startOnTick option is true, the min value might be rounded down.

Parameters:
min - The minimum value of the axis.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMinColor

public ColorAxis setMinColor(Color minColor)
Convenience method for setting the 'minColor' option of the map. Equivalent to:

     colorAxis.setOption("minColor", );
 
The color to represent the minimum of the color axis. Unless dataClasses or stops are set, the gradient starts at this value. If dataClasses are set, the color is based on minColor and maxColor unless a color is set for each data class, or the dataClassColor is set. Defaults to #EFEFFF.

Parameters:
minColor - The color to represent the minimum of the color axis.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMinColor

public ColorAxis setMinColor(String minColor)
Convenience method for setting the 'minColor' option of the map. Equivalent to:

     colorAxis.setOption("minColor", );
 
The color to represent the minimum of the color axis. Unless dataClasses or stops are set, the gradient starts at this value. If dataClasses are set, the color is based on minColor and maxColor unless a color is set for each data class, or the dataClassColor is set. Defaults to #EFEFFF.

Parameters:
minColor - The color to represent the minimum of the color axis.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMinPadding

public ColorAxis setMinPadding(Number minPadding)
Convenience method for setting the 'minPadding' option of the map. Equivalent to:

     colorAxis.setOption("minPadding", );
 
Padding of the min value relative to the length of the axis. A padding of 0.05 will make a 100px axis 5px longer. Defaults to 0.05.

Parameters:
minPadding - Padding of the min value relative to the length of the axis.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMinorGridLineColor

public ColorAxis setMinorGridLineColor(Color minorGridLineColor)
Convenience method for setting the 'minorGridLineColor' option of the map. Equivalent to:

     colorAxis.setOption("minorGridLineColor", );
 
Color of the minor, secondary grid lines. Defaults to #E0E0E0.

Parameters:
minorGridLineColor - Color of the minor grid lines.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMinorGridLineColor

public ColorAxis setMinorGridLineColor(String minorGridLineColor)
Convenience method for setting the 'minorGridLineColor' option of the map. Equivalent to:

     colorAxis.setOption("minorGridLineColor", );
 
Color of the minor, secondary grid lines. Defaults to #E0E0E0.

Parameters:
minorGridLineColor - Color of the minor grid lines.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMinorGridLineDashStyle

public ColorAxis setMinorGridLineDashStyle(PlotLine.DashStyle minorGridLineDashStyle)
Convenience method for setting the 'minorGridLineDashStyle' option of the map. Equivalent to:

     colorAxis.setOption("minorGridLineDashStyle", );
 
The dash or dot style of the minor grid lines. For possible values, see this demonstration. Defaults to Solid.

Parameters:
minorGridLineDashStyle - The style of the grid lines.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMinorGridLineWidth

public ColorAxis setMinorGridLineWidth(Number minorGridLineWidth)
Convenience method for setting the 'minorGridLineWidth' option of the map. Equivalent to:

     colorAxis.setOption("minorGridLineWidth", );
 
Width of the minor, secondary grid lines. Defaults to 1.

Parameters:
minorGridLineWidth - Width of the minor grid lines.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMinorTickColor

public ColorAxis setMinorTickColor(Color minorTickColor)
Convenience method for setting the 'minorTickColor' option of the map. Equivalent to:

     colorAxis.setOption("minorTickColor", );
 
Color for the minor tick marks. Defaults to #A0A0A0.

Parameters:
minorTickColor - Color for the minor tick marks.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMinorTickColor

public ColorAxis setMinorTickColor(String minorTickColor)
Convenience method for setting the 'minorTickColor' option of the map. Equivalent to:

     colorAxis.setOption("minorTickColor", );
 
Color for the minor tick marks. Defaults to #A0A0A0.

Parameters:
minorTickColor - Color for the minor tick marks.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMinorTickInterval

public ColorAxis setMinorTickInterval(Number minorTickInterval)
Convenience method for setting the 'minorTickInterval' option of the map. Equivalent to:

     colorAxis.setOption("minorTickInterval", );
 
Tick interval in scale units for the minor ticks. On a linear axis, if "auto", the minor tick interval is calculated as a fifth of the tickInterval. If null, minor ticks are not shown. On logarithmic axes, the unit is the power of the value. For example, setting the minorTickInterval to 1 puts one tick on each of 0.1, 1, 10, 100 etc. Setting the minorTickInterval to 0.1 produces 9 ticks between 1 and 10, 10 and 100 etc. A minorTickInterval of "auto" on a log axis results in a best guess, attempting to enter approximately 5 minor ticks between each major tick.

Parameters:
minorTickInterval - Tick interval in scale units for the minor ticks.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMinorTickInterval

public ColorAxis setMinorTickInterval(String minorTickInterval)
Convenience method for setting the 'minorTickInterval' option of the map. Equivalent to:

     colorAxis.setOption("minorTickInterval", );
 
Tick interval in scale units for the minor ticks. On a linear axis, if "auto", the minor tick interval is calculated as a fifth of the tickInterval. If null, minor ticks are not shown. On logarithmic axes, the unit is the power of the value. For example, setting the minorTickInterval to 1 puts one tick on each of 0.1, 1, 10, 100 etc. Setting the minorTickInterval to 0.1 produces 9 ticks between 1 and 10, 10 and 100 etc. A minorTickInterval of "auto" on a log axis results in a best guess, attempting to enter approximately 5 minor ticks between each major tick.

Parameters:
minorTickInterval - Tick interval in scale units for the minor ticks.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMinorTickLength

public ColorAxis setMinorTickLength(Number minorTickLength)
Convenience method for setting the 'minorTickLength' option of the map. Equivalent to:

     colorAxis.setOption("minorTickLength", );
 
The pixel length of the minor tick marks. Defaults to 2.

Parameters:
minorTickLength - The pixel length of the minor tick marks
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMinorTickPosition

public ColorAxis setMinorTickPosition(ColorAxis.TickPosition minorTickPosition)
Convenience method for setting the 'minorTickPosition' option of the colorAxis. Equivalent to:

     colorAxis.setOption("minortickPosition", "inside");
 
The position of the minor tick marks relative to the axis line. Can be one of inside and outside. Defaults to outside.

Parameters:
minorTickPosition - The position of the minor tick marks relative to the axis line.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setMinorTickWidth

public ColorAxis setMinorTickWidth(Number minorTickWidth)
Convenience method for setting the 'minorTickWidth' option of the map. Equivalent to:

     colorAxis.setOption("minorTickWidth", );
 
The pixel width of the minor tick mark. Defaults to 0.

Parameters:
minorTickWidth - The pixel width of the minor tick mark.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setReversed

public ColorAxis setReversed(Boolean reversed)
Convenience method for setting the 'reversed' option of the map. Equivalent to:

     colorAxis.setOption("reversed", );
 
Whether to reverse the axis so that the highest number is closest to the origin. Defaults to false in a horizontal legend and true in a vertical legend, where the smallest value starts on top.

Parameters:
reversed - Whether to reverse the axis.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setShowFirstLabel

public ColorAxis setShowFirstLabel(Boolean showFirstLabel)
Convenience method for setting the 'showFirstLabel' option of the map. Equivalent to:

     colorAxis.setOption("showFirstLabel", );
 
If labels are enabled, whether to show the first tick label. Defaults to true.

Parameters:
showFirstLabel - Whether to show the first tick label.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setShowLastLabel

public ColorAxis setShowLastLabel(Boolean showLastLabel)
Convenience method for setting the 'showLastLabel' option of the map. Equivalent to:

     colorAxis.setOption("showLastLabel", );
 
If labels are enabled, whether to show the last tick label. Defaults to true.

Parameters:
showLastLabel - Whether to show the last tick label
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setStartOnTick

public ColorAxis setStartOnTick(Boolean startOnTick)
Convenience method for setting the 'startOnTick' option of the map. Equivalent to:

     colorAxis.setOption("startOnTick", );
 
Whether to force the axis to start on a tick. Use this option with the maxPadding option to control the axis start. Defaults to true.

Parameters:
startOnTick - Whether to force the axis to start on a tick.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setStops

public ColorAxis setStops(com.google.gwt.json.client.JSONArray... stops)
Convenience method for setting the 'stops' option of the map. Sample Usage:

     colorAxis.setStops(
          ColorAxis.addStop(0, "#FF0000"),
          ColorAxis.addStop(.5, "#FFFFFF"),
          ColorAxis.addStop(.9, "#0000FF")
            ));
 
Color stops for the gradient of a scalar color axis. Use this in cases where a linear gradient between a minColor and maxColor is not sufficient. The stops is an array of tuples, where the first item is a float between 0 and 1 assigning the relative position in the gradient, and the second item is the color.

Parameters:
stops - An array of tuples where the first item is a float between 0 and 1 assigning the relative position in the gradient, and the second item is the color.
Returns:
A reference to this ColorAxis instance for convenient method chaining.
See Also:
addStop(Number, String)

addStop

public static com.google.gwt.json.client.JSONArray addStop(Number stopNumber,
                                                           String stopColor)
Convenience method for adding stops along the 'colorAxis' of a chart. Note that this method is intended for use in conjunction with the setStops(com.google.gwt.json.client.JSONArray...) method.

Parameters:
stopNumber - The relative position in the gradient.
stopColor - The color
Returns:
A tuple containing the stop number and stop color.
See Also:
setStops(com.google.gwt.json.client.JSONArray...)

setTickColor

public ColorAxis setTickColor(Color tickColor)
Convenience method for setting the 'tickColor' option of the map. Equivalent to:

     colorAxis.setOption("tickColor", new Color());
 
Color for the main tick marks. Defaults to #C0D0E0.

Parameters:
tickColor - Color for the main tick marks.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setTickColor

public ColorAxis setTickColor(String tickColor)
Convenience method for setting the 'tickColor' option of the map. Equivalent to:

     colorAxis.setOption("tickColor", "#A0A0A0");
 
Color for the main tick marks. Defaults to #C0D0E0.

Parameters:
tickColor - Color for the main tick marks.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setTickInterval

public ColorAxis setTickInterval(Number tickInterval)
Convenience method for setting the 'tickInterval' option of the map. Equivalent to:

     colorAxis.setOption("tickInterval", 12);
 
If tickInterval is null this option sets the approximate pixel interval of the tick marks. Defaults to 72.

Parameters:
tickInterval - The approximate pixel interval of the tick marks
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setTickLength

public ColorAxis setTickLength(Number tickLength)
Convenience method for setting the 'tickLength' option of the map. Equivalent to:

     colorAxis.setOption("tickLength", 6);
 
The pixel length of the main tick marks. Defaults to 10.

Parameters:
tickLength - The pixel length of the main tick marks
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setTickPixelInterval

public ColorAxis setTickPixelInterval(Number tickPixelInterval)
Convenience method for setting the 'tickPixelInterval' option of the map. Equivalent to:

     colorAxis.setOption("tickPixelInterval", 28);
 
If tickInterval is null this option sets the approximate pixel interval of the tick marks. Defaults to 72.

Parameters:
tickPixelInterval - Tthe approximate pixel interval of the tick marks.
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setTickPosition

public ColorAxis setTickPosition(ColorAxis.TickPosition tickPosition)
Convenience method for setting the 'tickPosition' option of the color axis. Equivalent to:

     colorAxis.setOption("tickPosition", "inside"):
 
The position of the major tick marks relative to the axis line. Can be one of inside and outside. Defaults to outside.

Parameters:
tickPosition - The position of the major tick marks
Returns:
A reference to this ColorAxis instance for convenient method chaining.

setTickWidth

public ColorAxis setTickWidth(Number tickWidth)
Convenience method for setting the 'tickWidth' option of the map. Equivalent to:

     colorAxis.setOption("tickWidth", 6);
 
The pixel width of the major tick marks. Defaults to 0.

Parameters:
tickWidth - The number of pixels a tick is wide.
Returns:
A reference to this ColorAxis instance for convenient method chaining.


Copyright © 2015. All Rights Reserved.