Class Axis
- All Implemented Interfaces:
Serializable
Abstract Axis class.
- Version:
- $Id: $Id
- Author:
- Vaadin
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the configuration this axis is bound to.abstract BooleangetEndOnTick.abstract ColorgetGridLineColor.abstract DashStylegetGridLineDashStyle.abstract NumbergetGridLineWidth.abstract StringgetId()getId.abstract LabelsgetLabels.getMax()Getter for the fieldmax.abstract NumbergetMaxPadding.getMin()Getter for the fieldmin.abstract ColorgetMinorGridLineColor.abstract DashStylegetMinorGridLineDashStyle.abstract NumbergetMinorGridLineWidth.abstract ColorgetMinorTickColor.abstract StringgetMinorTickInterval.abstract NumbergetMinorTickLength.abstract TickPositiongetMinorTickPosition.abstract NumbergetMinorTickWidth.abstract NumbergetMinPadding.abstract BooleangetReversed.abstract BooleangetShowFirstLabel.abstract BooleangetShowLastLabel.abstract BooleangetStartOnTick.abstract ColorgetTickColor.abstract NumbergetTickInterval.abstract NumbergetTickLength.abstract NumbergetTickPixelInterval.abstract TickPositiongetTickPosition.abstract Number[]getTickPositions.abstract NumbergetTickWidth.voidsetAxisIndex(int i) Setter for the fieldaxisIndex.voidsetConfiguration(MapConfiguration configuration) Sets the configuration this axis is bound to.voidsetExtremes(Number min, Number max) Sets the minimum and maximum of the axes after rendering has finished.voidsetExtremes(Number min, Number max, boolean redraw) Sets the extremes at runtime.voidsetExtremes(Number minimum, Number maximum, boolean redraw, boolean animate) Run-time modification of the axis extremes.abstract voidsetGridLineColor(Color gridLineColor) Color of the grid lines extending the ticks across the plot area.abstract voidsetGridLineDashStyle(DashStyle gridLineDashStyle) The dash or dot style of the grid lines.abstract voidsetGridLineWidth(Number gridLineWidth) The width of the grid lines extending the ticks across the plot area.abstract voidAn id for the axis.abstract voidThe axis labels show the number or category for each tick.voidThe maximum value of the axis.abstract voidsetMaxPadding(Number maxPadding) Padding of the max value relative to the length of the axis.voidThe minimum value of the axis.abstract voidsetMinorGridLineColor(Color minorGridLineColor) Color of the minor, secondary grid lines.abstract voidsetMinorGridLineDashStyle(DashStyle minorGridLineDashStyle) The dash or dot style of the minor grid lines.abstract voidsetMinorGridLineWidth(Number minorGridLineWidth) Width of the minor, secondary grid lines.abstract voidsetMinorTickColor(Color minorTickColor) Color for the minor tick marks.abstract voidsetMinorTickInterval(String minorTickInterval) Tick interval in scale units for the minor ticks.abstract voidsetMinorTickLength(Number minorTickLength) The pixel length of the minor tick marks.abstract voidsetMinorTickPosition(TickPosition minorTickPosition) The position of the minor tick marks relative to the axis line.abstract voidsetMinorTickWidth(Number minorTickWidth) The pixel width of the minor tick mark.abstract voidsetMinPadding(Number minPadding) Padding of the min value relative to the length of the axis.abstract voidsetReversed(Boolean reversed) Whether to reverse the axis so that the highest number is closest to the origin.abstract voidsetShowFirstLabel(Boolean showFirstLabel) Whether to show the first tick label.abstract voidsetShowLastLabel(Boolean showLastLabel) Whether to show the last tick label.abstract voidsetStartOnTick(Boolean startOnTick) Whether to force the axis to start on a tick.abstract voidsetTickColor(Color tickColor) Color for the main tick marks.abstract voidsetTickInterval(Number tickInterval) The interval of the tick marks in axis units.abstract voidsetTickLength(Number tickLength) The pixel length of the main tick marks.abstract voidsetTickPixelInterval(Number tickPixelInterval) If tickInterval isnullthis option sets the approximate pixel interval of the tick marks.abstract voidsetTickPosition(TickPosition tickPosition) The position of the major tick marks relative to the axis line.abstract voidsetTickPositions(Number[] tickPositions) An array defining where the ticks are laid out on the axis.abstract voidsetTickWidth(Number tickWidth) The pixel width of the major tick marks.
-
Field Details
-
min
-
max
-
-
Constructor Details
-
Axis
public Axis()
-
-
Method Details
-
setAxisIndex
public void setAxisIndex(int i) Setter for the field
axisIndex.- Parameters:
i- a int.
-
getMin
Getter for the field
min.- Returns:
- the minimum value of the axis or null
- See Also:
-
setMin
The minimum value of the axis. If null the min value is automatically calculated. If the startOnTick option is true, the min value might be rounded down.- Parameters:
min- aNumberobject.
-
getMax
Getter for the field
max.- Returns:
- Maximum value of axis or null
- See Also:
-
setMax
The maximum value of the axis. If null, the max value is automatically calculated. If the endOnTick option is true, the max value might be rounded up. The actual maximum value is also influenced by chart.alignTicks.- Parameters:
max- aNumberobject.
-
setExtremes
Sets the minimum and maximum of the axes after rendering has finished. If the startOnTick and endOnTick options are true, the minimum and maximum values are rounded off to the nearest tick. To prevent this, these options can be set to false before calling setExtremes.- Parameters:
min- The new minimum valuemax- The new maximum value
-
setExtremes
Sets the extremes at runtime.- Parameters:
min- Minimum.max- Maximum.redraw- Whether or not to redraw the chart.
-
setExtremes
Run-time modification of the axis extremes.- Parameters:
minimum- New minimum value.maximum- New maximum value.redraw- Whether or not to redraw the chart.animate- Whether or not to animate the rescaling.
-
getConfiguration
Returns the configuration this axis is bound to.- Returns:
- The configuration.
-
setConfiguration
Sets the configuration this axis is bound to. This method is automatically called by configuration, when the axis is added to it.- Parameters:
configuration- Configuration this object is linked to.
-
getEndOnTick
getEndOnTick.
- Returns:
- a
Booleanobject. - See Also:
-
getGridLineColor
getGridLineColor.
- Returns:
- a
Colorobject. - See Also:
-
setGridLineColor
Color of the grid lines extending the ticks across the plot area.- Parameters:
gridLineColor- aColorobject.
-
getGridLineDashStyle
getGridLineDashStyle.
- Returns:
- a
DashStyleobject. - See Also:
-
setGridLineDashStyle
The dash or dot style of the grid lines.- Parameters:
gridLineDashStyle- aDashStyleobject.
-
getGridLineWidth
getGridLineWidth.
- Returns:
- a
Numberobject. - See Also:
-
setGridLineWidth
The width of the grid lines extending the ticks across the plot area.- Parameters:
gridLineWidth- aNumberobject.
-
getId
getId.
- Returns:
- a
Stringobject. - See Also:
-
setId
An id for the axis. This can be used after render time to get a pointer to the axis object throughchart.get().- Parameters:
id- aStringobject.
-
getLabels
getLabels.
- Returns:
- a
Labelsobject. - See Also:
-
setLabels
The axis labels show the number or category for each tick.- Parameters:
labels- aLabelsobject.
-
getMaxPadding
getMaxPadding.
- Returns:
- a
Numberobject. - See Also:
-
setMaxPadding
Padding of the max value relative to the length of the axis. A padding of 0.05 will make a 100px axis 5px longer. This is useful when you don't want the highest data value to appear on the edge of the plot area. When the axis'maxoption is set or a max extreme is set usingaxis.setExtremes(), the maxPadding will be ignored.- Parameters:
maxPadding- aNumberobject.
-
getMinPadding
getMinPadding.
- Returns:
- a
Numberobject. - See Also:
-
setMinPadding
Padding of the min value relative to the length of the axis. A padding of 0.05 will make a 100px axis 5px longer. This is useful when you don't want the lowest data value to appear on the edge of the plot area. When the axis'minoption is set or a min extreme is set usingaxis.setExtremes(), the minPadding will be ignored.- Parameters:
minPadding- aNumberobject.
-
getMinorGridLineColor
getMinorGridLineColor.
- Returns:
- a
Colorobject. - See Also:
-
setMinorGridLineColor
Color of the minor, secondary grid lines.- Parameters:
minorGridLineColor- aColorobject.
-
getMinorGridLineDashStyle
getMinorGridLineDashStyle.
- Returns:
- a
DashStyleobject. - See Also:
-
setMinorGridLineDashStyle
The dash or dot style of the minor grid lines.- Parameters:
minorGridLineDashStyle- aDashStyleobject.
-
getMinorGridLineWidth
getMinorGridLineWidth.
- Returns:
- a
Numberobject. - See Also:
-
setMinorGridLineWidth
Width of the minor, secondary grid lines.- Parameters:
minorGridLineWidth- aNumberobject.
-
getMinorTickColor
getMinorTickColor.
- Returns:
- a
Colorobject. - See Also:
-
setMinorTickColor
Color for the minor tick marks.- Parameters:
minorTickColor- aColorobject.
-
getMinorTickInterval
getMinorTickInterval.
- Returns:
- a
Stringobject. - See Also:
-
setMinorTickInterval
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. Ifnull, 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.
If user settings dictate minor ticks to become too dense, they don't make sense, and will be ignored to prevent performance problems.
On axes using
categories, minor ticks are not supported.- Parameters:
minorTickInterval- aStringobject.
-
getMinorTickLength
getMinorTickLength.
- Returns:
- a
Numberobject. - See Also:
-
setMinorTickLength
The pixel length of the minor tick marks.- Parameters:
minorTickLength- aNumberobject.
-
getMinorTickPosition
getMinorTickPosition.
- Returns:
- a
TickPositionobject. - See Also:
-
setMinorTickPosition
The position of the minor tick marks relative to the axis line. Can be one ofinsideandoutside.- Parameters:
minorTickPosition- aTickPositionobject.
-
getMinorTickWidth
getMinorTickWidth.
- Returns:
- a
Numberobject. - See Also:
-
setMinorTickWidth
The pixel width of the minor tick mark.- Parameters:
minorTickWidth- aNumberobject.
-
getReversed
getReversed.
- Returns:
- a
Booleanobject. - See Also:
-
setReversed
Whether to reverse the axis so that the highest number is closest to the origin.- Parameters:
reversed- aBooleanobject.
-
getShowFirstLabel
getShowFirstLabel.
- Returns:
- a
Booleanobject. - See Also:
-
setShowFirstLabel
Whether to show the first tick label.- Parameters:
showFirstLabel- aBooleanobject.
-
getShowLastLabel
getShowLastLabel.
- Returns:
- a
Booleanobject. - See Also:
-
setShowLastLabel
Whether to show the last tick label.- Parameters:
showLastLabel- aBooleanobject.
-
getStartOnTick
getStartOnTick.
- Returns:
- a
Booleanobject. - See Also:
-
setStartOnTick
Whether to force the axis to start on a tick. Use this option with theminPaddingoption to control the axis start.- Parameters:
startOnTick- aBooleanobject.
-
getTickColor
getTickColor.
- Returns:
- a
Colorobject. - See Also:
-
setTickColor
Color for the main tick marks.- Parameters:
tickColor- aColorobject.
-
getTickInterval
getTickInterval.
- Returns:
- a
Numberobject. - See Also:
-
setTickInterval
The interval of the tick marks in axis units. When
null, the tick interval is computed to approximately follow thetickPixelIntervalon linear and datetime axes. On categorized axes, anulltickInterval will default to 1, one category. Note that datetime axes are based on milliseconds, so for example an interval of one day is expressed as24 * 3600 * 1000.On logarithmic axes, the tickInterval is based on powers, so a tickInterval of 1 means one tick on each of 0.1, 1, 10, 100 etc. A tickInterval of 2 means a tick of 0.1, 10, 1000 etc. A tickInterval of 0.2 puts a tick on 0.1, 0.2, 0.4, 0.6, 0.8, 1, 2, 4, 6, 8, 10, 20, 40 etc.
If the tickInterval is too dense for labels to be drawn, Highcharts may remove ticks.
- Parameters:
tickInterval- aNumberobject.
-
getTickLength
getTickLength.
- Returns:
- a
Numberobject. - See Also:
-
setTickLength
The pixel length of the main tick marks.- Parameters:
tickLength- aNumberobject.
-
getTickPixelInterval
getTickPixelInterval.
- Returns:
- a
Numberobject. - See Also:
-
setTickPixelInterval
If tickInterval isnullthis option sets the approximate pixel interval of the tick marks. Not applicable to categorized axis.- Parameters:
tickPixelInterval- aNumberobject.
-
getTickPosition
getTickPosition.
- Returns:
- a
TickPositionobject. - See Also:
-
setTickPosition
The position of the major tick marks relative to the axis line. Can be one ofinsideandoutside.- Parameters:
tickPosition- aTickPositionobject.
-
getTickPositions
getTickPositions.
- Returns:
- an array of
Numberobjects. - See Also:
-
setTickPositions
An array defining where the ticks are laid out on the axis. This overrides the default behaviour oftickPixelIntervalandtickInterval.- Parameters:
tickPositions- an array ofNumberobjects.
-
getTickWidth
getTickWidth.
- Returns:
- a
Numberobject. - See Also:
-
setTickWidth
The pixel width of the major tick marks.- Parameters:
tickWidth- aNumberobject.
-