|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.moxieapps.gwt.highcharts.client.Configurable<ColorAxis> org.moxieapps.gwt.highcharts.client.ColorAxis
public class 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.
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 |
---|
public ColorAxis()
Method Detail |
---|
public ColorAxis setDataClassColor(ColorAxis.DataClassColor dataClassColor)
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.
dataClassColor
- Determines how to set each dataClass' color
ColorAxis
instance for convenient method chaining.public ColorAxis setEndOnTick(Boolean endOnTick)
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.
endOnTick
- Whether to force the axis to end on a tick
ColorAxis
instance for convenient method chaining.public ColorAxis setGridLineColor(Color gridLineColor)
colorAxis.setOption("gridLineColor", );
Color of the grid lines extending from the axis across the gradient. Defaults to #C0C0C0.
gridLineColor
- Color of the grid lines
ColorAxis
instance for convenient method chaining.public ColorAxis setGridLineColor(String gridLineColor)
colorAxis.setOption("gridLineColor", );
Color of the grid lines extending from the axis across the gradient. Defaults to #C0C0C0.
gridLineColor
- Color of the grid lines.
ColorAxis
instance for convenient method chaining.public ColorAxis setGridLineDashStyle(PlotLine.DashStyle gridLineDashStyle)
colorAxis.setOption("gridLineDashStyle", );
The dash or dot style of the grid lines. For possible values, see this demonstration. Defaults to Solid.
gridLineDashStyle
- The dash or dot style of the grid lines.
ColorAxis
instance for convenient method chaining.public ColorAxis setGridLineWidth(Number gridLineWidth)
colorAxis.setOption("gridLineWidth", );
The width of the grid lines extending from the axis across the gradient of a scalar color axis. Defaults to 1.
gridLineWidth
- The width of the grid lines.
ColorAxis
instance for convenient method chaining.public ColorAxis setId(String id)
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().
id
- An id for the axis.
ColorAxis
instance for convenient method chaining.public ColorAxis setLabels(XAxisLabels labels)
colorAxis.setOption("labels", );
The axis labels show the number for each tick.
labels
- The axis labels show the number for each tick.
ColorAxis
instance for convenient method chaining.XAxisLabels
public ColorAxis setLineColor(Color lineColor)
colorAxis.setOption("lineColor", );
The color of the line marking the axis itself. Defaults to #C0D0E0.
lineColor
- The color of the line marking the axis.
ColorAxis
instance for convenient method chaining.public ColorAxis setLineColor(String lineColor)
colorAxis.setOption("lineColor", );
The color of the line marking the axis itself. Defaults to #C0D0E0.
lineColor
- The color of the line marking the axis itself.
ColorAxis
instance for convenient method chaining.public ColorAxis setLineWidth(Number lineWidth)
colorAxis.setOption("lineWidth", );
The width of the line marking the axis itself. Defaults to 0.
lineWidth
- The width of the line marking the axis itself.
ColorAxis
instance for convenient method chaining.public ColorAxis setMarkerAnimation(Animation markerAnimation)
colorAxis.setOption("marker/animation", );
Animation for the marker as it moves between values. Set to false to disable animation.
Defaults to { duration: 50 }
markerAnimation
- An instance of the Animation
class which provides specific options for
configuring the animation
ColorAxis
instance for convenient method chaining.public ColorAxis setMarkerAnimation(boolean markerAnimation)
colorAxis.setOption("marker/animation", true);
Animation for the marker as it moves between values. Set to false to disable animation.
Defaults to { duration: 50 }.
markerAnimation
- Whether to allow or disable animations in color axis.
ColorAxis
instance for convenient method chaining.public ColorAxis setMarkerColor(Color color)
colorAxis.setOption("marker/color", );
The color of the marker. Defaults to gray
color
- An instance of the ColorAxis.DataClassColor
class which provides specific options for setting the
color of the marker.
ColorAxis
instance for convenient method chaining.public ColorAxis setMax(Number max)
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.
max
- The maximum value of the axis.
ColorAxis
instance for convenient method chaining.public ColorAxis setMaxColor(Color maxColor)
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.
maxColor
- The color to represent the maximum of the color axis.
ColorAxis
instance for convenient method chaining.public ColorAxis setMaxColor(String maxColor)
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.
maxColor
- The color to represent the maximum of the color axis.
ColorAxis
instance for convenient method chaining.public ColorAxis setMaxPadding(Number maxPadding)
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.
maxPadding
- Padding of the max value relative to the length of the axis.
ColorAxis
instance for convenient method chaining.public ColorAxis setMin(Number min)
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.
min
- The minimum value of the axis.
ColorAxis
instance for convenient method chaining.public ColorAxis setMinColor(Color minColor)
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.
minColor
- The color to represent the minimum of the color axis.
ColorAxis
instance for convenient method chaining.public ColorAxis setMinColor(String minColor)
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.
minColor
- The color to represent the minimum of the color axis.
ColorAxis
instance for convenient method chaining.public ColorAxis setMinPadding(Number minPadding)
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.
minPadding
- Padding of the min value relative to the length of the axis.
ColorAxis
instance for convenient method chaining.public ColorAxis setMinorGridLineColor(Color minorGridLineColor)
colorAxis.setOption("minorGridLineColor", );
Color of the minor, secondary grid lines. Defaults to #E0E0E0.
minorGridLineColor
- Color of the minor grid lines.
ColorAxis
instance for convenient method chaining.public ColorAxis setMinorGridLineColor(String minorGridLineColor)
colorAxis.setOption("minorGridLineColor", );
Color of the minor, secondary grid lines. Defaults to #E0E0E0.
minorGridLineColor
- Color of the minor grid lines.
ColorAxis
instance for convenient method chaining.public ColorAxis setMinorGridLineDashStyle(PlotLine.DashStyle minorGridLineDashStyle)
colorAxis.setOption("minorGridLineDashStyle", );
The dash or dot style of the minor grid lines. For possible values, see this demonstration. Defaults to Solid.
minorGridLineDashStyle
- The style of the grid lines.
ColorAxis
instance for convenient method chaining.public ColorAxis setMinorGridLineWidth(Number minorGridLineWidth)
colorAxis.setOption("minorGridLineWidth", );
Width of the minor, secondary grid lines. Defaults to 1.
minorGridLineWidth
- Width of the minor grid lines.
ColorAxis
instance for convenient method chaining.public ColorAxis setMinorTickColor(Color minorTickColor)
colorAxis.setOption("minorTickColor", );
Color for the minor tick marks. Defaults to #A0A0A0.
minorTickColor
- Color for the minor tick marks.
ColorAxis
instance for convenient method chaining.public ColorAxis setMinorTickColor(String minorTickColor)
colorAxis.setOption("minorTickColor", );
Color for the minor tick marks. Defaults to #A0A0A0.
minorTickColor
- Color for the minor tick marks.
ColorAxis
instance for convenient method chaining.public ColorAxis setMinorTickInterval(Number minorTickInterval)
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.
minorTickInterval
- Tick interval in scale units for the minor ticks.
ColorAxis
instance for convenient method chaining.public ColorAxis setMinorTickInterval(String minorTickInterval)
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.
minorTickInterval
- Tick interval in scale units for the minor ticks.
ColorAxis
instance for convenient method chaining.public ColorAxis setMinorTickLength(Number minorTickLength)
colorAxis.setOption("minorTickLength", );
The pixel length of the minor tick marks. Defaults to 2.
minorTickLength
- The pixel length of the minor tick marks
ColorAxis
instance for convenient method chaining.public ColorAxis setMinorTickPosition(ColorAxis.TickPosition minorTickPosition)
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.
minorTickPosition
- The position of the minor tick marks relative to the axis line.
ColorAxis
instance for convenient method chaining.public ColorAxis setMinorTickWidth(Number minorTickWidth)
colorAxis.setOption("minorTickWidth", );
The pixel width of the minor tick mark. Defaults to 0.
minorTickWidth
- The pixel width of the minor tick mark.
ColorAxis
instance for convenient method chaining.public ColorAxis setReversed(Boolean reversed)
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.
reversed
- Whether to reverse the axis.
ColorAxis
instance for convenient method chaining.public ColorAxis setShowFirstLabel(Boolean showFirstLabel)
colorAxis.setOption("showFirstLabel", );
If labels are enabled, whether to show the first tick label. Defaults to true.
showFirstLabel
- Whether to show the first tick label.
ColorAxis
instance for convenient method chaining.public ColorAxis setShowLastLabel(Boolean showLastLabel)
colorAxis.setOption("showLastLabel", );
If labels are enabled, whether to show the last tick label. Defaults to true.
showLastLabel
- Whether to show the last tick label
ColorAxis
instance for convenient method chaining.public ColorAxis setStartOnTick(Boolean startOnTick)
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.
startOnTick
- Whether to force the axis to start on a tick.
ColorAxis
instance for convenient method chaining.public ColorAxis setStops(com.google.gwt.json.client.JSONArray... stops)
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.
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.
ColorAxis
instance for convenient method chaining.addStop(Number, String)
public static com.google.gwt.json.client.JSONArray addStop(Number stopNumber, String stopColor)
setStops(com.google.gwt.json.client.JSONArray...)
method.
stopNumber
- The relative position in the gradient.stopColor
- The color
setStops(com.google.gwt.json.client.JSONArray...)
public ColorAxis setTickColor(Color tickColor)
colorAxis.setOption("tickColor", new Color());
Color for the main tick marks. Defaults to #C0D0E0.
tickColor
- Color for the main tick marks.
ColorAxis
instance for convenient method chaining.public ColorAxis setTickColor(String tickColor)
colorAxis.setOption("tickColor", "#A0A0A0");
Color for the main tick marks. Defaults to #C0D0E0.
tickColor
- Color for the main tick marks.
ColorAxis
instance for convenient method chaining.public ColorAxis setTickInterval(Number tickInterval)
colorAxis.setOption("tickInterval", 12);
If tickInterval is null this option sets the approximate pixel interval of the tick marks. Defaults to 72.
tickInterval
- The approximate pixel interval of the tick marks
ColorAxis
instance for convenient method chaining.public ColorAxis setTickLength(Number tickLength)
colorAxis.setOption("tickLength", 6);
The pixel length of the main tick marks. Defaults to 10.
tickLength
- The pixel length of the main tick marks
ColorAxis
instance for convenient method chaining.public ColorAxis setTickPixelInterval(Number tickPixelInterval)
colorAxis.setOption("tickPixelInterval", 28);
If tickInterval is null this option sets the approximate pixel interval of the tick marks. Defaults to 72.
tickPixelInterval
- Tthe approximate pixel interval of the tick marks.
ColorAxis
instance for convenient method chaining.public ColorAxis setTickPosition(ColorAxis.TickPosition tickPosition)
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.
tickPosition
- The position of the major tick marks
ColorAxis
instance for convenient method chaining.public ColorAxis setTickWidth(Number tickWidth)
colorAxis.setOption("tickWidth", 6);
The pixel width of the major tick marks. Defaults to 0.
tickWidth
- The number of pixels a tick is wide.
ColorAxis
instance for convenient method chaining.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |