Class YAxis
- All Implemented Interfaces:
Serializable
The Y axis. A Highcharts map has hidden X and Y axes to control layout of the shapes and features like zooming and panning. Zooming is in effect the same as setting the extremes of one of the axes, and Highmaps is set up to make the other axis zoom the same amount.
Highmaps uses the coordinate system of the map points' path configurations.
See the Axis object for programmatic access to the axis.
- Version:
- $Id: $Id
- Author:
- Vaadin
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGetter for the fieldallowDecimals.Getter for the fieldalternateGridColor.Getter for the fieldcrosshair.Getter for the fieldendOnTick.Getter for the fieldgridLineColor.Getter for the fieldgridLineDashStyle.Getter for the fieldgridLineWidth.getId()Getter for the fieldid.Getter for the fieldlabels.Getter for the fieldlineColor.Getter for the fieldlineWidth.Getter for the fieldmaxPadding.Getter for the fieldminorGridLineColor.Getter for the fieldminorGridLineDashStyle.Getter for the fieldminorGridLineWidth.Getter for the fieldminorTickColor.Getter for the fieldminorTickInterval.Getter for the fieldminorTickLength.Getter for the fieldminorTickPosition.Getter for the fieldminorTickWidth.Getter for the fieldminPadding.Getter for the fieldminRange.Getter for the fieldminTickInterval.Getter for the fieldoffset.Getter for the fieldopposite.Getter for the fieldreversed.Getter for the fieldshowEmpty.Getter for the fieldshowFirstLabel.Getter for the fieldshowLastLabel.Getter for the fieldstartOnTick.Getter for the fieldtickColor.Getter for the fieldtickInterval.Getter for the fieldtickLength.Getter for the fieldtickPixelInterval.Getter for the fieldtickPosition.Number[]Getter for the fieldtickPositions.Getter for the fieldtickWidth.getTitle()Getter for the fieldtitle.voidsetAllowDecimals(Boolean allowDecimals) Whether to allow decimals in this axis' ticks.voidsetAlternateGridColor(Color alternateGridColor) When using an alternate grid color, a band is painted across the plot area between every other grid line.voidsetCrosshair(Crosshair crosshair) Configure a crosshair that follows either the mouse pointer or the hovered point.voidsetEndOnTick(Boolean endOnTick) Whether to force the axis to end on a tick.voidsetGridLineColor(Color gridLineColor) Color of the grid lines extending the ticks across the plot area.voidsetGridLineDashStyle(DashStyle gridLineDashStyle) The dash or dot style of the grid lines.voidsetGridLineWidth(Number gridLineWidth) The width of the grid lines extending the ticks across the plot area.voidAn id for the axis.voidThe axis labels show the number or category for each tick.voidsetLineColor(Color lineColor) The color of the line marking the axis itself.voidsetLineWidth(Number lineWidth) The width of the line marking the axis itself.voidsetMaxPadding(Number maxPadding) Padding of the max value relative to the length of the axis.voidsetMinorGridLineColor(Color minorGridLineColor) Color of the minor, secondary grid lines.voidsetMinorGridLineDashStyle(DashStyle minorGridLineDashStyle) The dash or dot style of the minor grid lines.voidsetMinorGridLineWidth(Number minorGridLineWidth) Width of the minor, secondary grid lines.voidsetMinorTickColor(Color minorTickColor) Color for the minor tick marks.voidsetMinorTickInterval(String minorTickInterval) Tick interval in scale units for the minor ticks.voidsetMinorTickLength(Number minorTickLength) The pixel length of the minor tick marks.voidsetMinorTickPosition(TickPosition minorTickPosition) The position of the minor tick marks relative to the axis line.voidsetMinorTickWidth(Number minorTickWidth) The pixel width of the minor tick mark.voidsetMinPadding(Number minPadding) Padding of the min value relative to the length of the axis.voidsetMinRange(Number minRange) The minimum range to display on this axis.voidsetMinTickInterval(Number minTickInterval) The minimum tick interval allowed in axis values.voidThe distance in pixels from the plot area to the axis line.voidsetOpposite(Boolean opposite) Whether to display the axis on the opposite side of the normal.voidsetReversed(Boolean reversed) Whether to reverse the axis so that the highest number is closest to the origin.voidsetShowEmpty(Boolean showEmpty) Whether to show the axis line and title when the axis has no data.voidsetShowFirstLabel(Boolean showFirstLabel) Whether to show the first tick label.voidsetShowLastLabel(Boolean showLastLabel) Whether to show the last tick label.voidsetStartOnTick(Boolean startOnTick) Whether to force the axis to start on a tick.voidsetTickColor(Color tickColor) Color for the main tick marks.voidsetTickInterval(Number tickInterval) The interval of the tick marks in axis units.voidsetTickLength(Number tickLength) The pixel length of the main tick marks.voidsetTickPixelInterval(Number tickPixelInterval) If tickInterval isnullthis option sets the approximate pixel interval of the tick marks.voidsetTickPosition(TickPosition tickPosition) The position of the major tick marks relative to the axis line.voidsetTickPositions(Number[] tickPositions) An array defining where the ticks are laid out on the axis.voidsetTickWidth(Number tickWidth) The pixel width of the major tick marks.voidThe axis title.voidSetter for the fieldtitle.Methods inherited from class com.vaadin.componentfactory.maps.model.Axis
getConfiguration, getMax, getMin, setAxisIndex, setConfiguration, setExtremes, setExtremes, setExtremes, setMax, setMin
-
Constructor Details
-
YAxis
public YAxis()Constructor for YAxis.
-
-
Method Details
-
getAllowDecimals
Getter for the field
allowDecimals.- Returns:
- a
Booleanobject. - See Also:
-
setAllowDecimals
Whether to allow decimals in this axis' ticks. Ticks are hidden by default on a Highmaps axis, though they are inherited from Highcharts and can be enabled.Defaults to: true
- Parameters:
allowDecimals- aBooleanobject.
-
getAlternateGridColor
Getter for the field
alternateGridColor.- Returns:
- a
Colorobject. - See Also:
-
setAlternateGridColor
When using an alternate grid color, a band is painted across the plot area between every other grid line.- Parameters:
alternateGridColor- aColorobject.
-
getCrosshair
Getter for the field
crosshair.- Returns:
- a
Crosshairobject. - See Also:
-
setCrosshair
Configure a crosshair that follows either the mouse pointer or the hovered point.Defaults to: false
- Parameters:
crosshair- aCrosshairobject.
-
getEndOnTick
Getter for the field
endOnTick.- Specified by:
getEndOnTickin classAxis- Returns:
- a
Booleanobject. - See Also:
-
setEndOnTick
Whether to force the axis to end on a tick. Use this option with themaxPaddingoption to control the axis end.Defaults to: false
-
getGridLineColor
Getter for the field
gridLineColor.- Specified by:
getGridLineColorin classAxis- Returns:
- a
Colorobject. - See Also:
-
setGridLineColor
Color of the grid lines extending the ticks across the plot area. Color of the grid lines extending the ticks across the plot area. Highmaps grid lines are hidden by default and can be enabled by setting the gridLineWidth option.Defaults to: #D8D8D8
- Specified by:
setGridLineColorin classAxis- Parameters:
gridLineColor- aColorobject.
-
getGridLineDashStyle
Getter for the field
gridLineDashStyle.- Specified by:
getGridLineDashStylein classAxis- Returns:
- a
DashStyleobject. - See Also:
-
setGridLineDashStyle
The dash or dot style of the grid lines. The dash or dot style of the grid lines. For possible values, see this demonstration.Defaults to: Solid
- Specified by:
setGridLineDashStylein classAxis- Parameters:
gridLineDashStyle- aDashStyleobject.
-
getGridLineWidth
Getter for the field
gridLineWidth.- Specified by:
getGridLineWidthin classAxis- Returns:
- a
Numberobject. - See Also:
-
setGridLineWidth
The width of the grid lines extending the ticks across the plot area. The width of the grid lines extending the ticks across the plot area.Defaults to: 0
- Specified by:
setGridLineWidthin classAxis- Parameters:
gridLineWidth- aNumberobject.
-
getId
Getter for the field
id. -
setId
An id for the axis. This can be used after render time to get a pointer to the axis object throughchart.get(). An id for the axis. This can be used after render time to get a pointer to the axis object throughchart.get(). -
getLabels
Getter for the field
labels. -
setLabels
The axis labels show the number or category for each tick.The axis labels show the number or category for each tick. X and Y axis labels are by default disabled in Highmaps, but the functionality is inherited from Highcharts and used on colorAxis, and can be enabled on X and Y axes too.
For more live examples on label options, see yAxis.labels in the Highcharts API.
-
getLineColor
Getter for the field
lineColor.- Returns:
- a
Colorobject. - See Also:
-
setLineColor
The color of the line marking the axis itself.Defaults to: #C0D0E0
- Parameters:
lineColor- aColorobject.
-
getLineWidth
Getter for the field
lineWidth.- Returns:
- a
Numberobject. - See Also:
-
setLineWidth
The width of the line marking the axis itself.Defaults to: 0
- Parameters:
lineWidth- aNumberobject.
-
getMaxPadding
Getter for the field
maxPadding.- Specified by:
getMaxPaddingin classAxis- 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. 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 map shapes to touch the plot border. When the axis'maxoption is set or a max extreme is set usingaxis.setExtremes(), the maxPadding will be ignored.Defaults to: 0
- Specified by:
setMaxPaddingin classAxis- Parameters:
maxPadding- aNumberobject.
-
getMinPadding
Getter for the field
minPadding.- Specified by:
getMinPaddingin classAxis- 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. 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 map shapes to touch the plot border. When the axis'minoption is set or a min extreme is set usingaxis.setExtremes(), the minPadding will be ignored.Defaults to: 0
- Specified by:
setMinPaddingin classAxis- Parameters:
minPadding- aNumberobject.
-
getMinRange
Getter for the field
minRange.- Returns:
- a
Numberobject. - See Also:
-
setMinRange
The minimum range to display on this axis. The entire axis will not be allowed to span over a smaller interval than this, in terms of shape path coordinates. Defaults to 5 times the size of the smallest area.
Note that the
minPadding,maxPadding,startOnTickandendOnTicksettings also affect how the extremes of the axis are computed.- Parameters:
minRange- aNumberobject.
-
getMinTickInterval
Getter for the field
minTickInterval.- Returns:
- a
Numberobject. - See Also:
-
setMinTickInterval
The minimum tick interval allowed in axis values. For example on zooming in on an axis with daily data, this can be used to prevent the axis from showing hours. In Highmaps, ticks are hidden by default.- Parameters:
minTickInterval- aNumberobject.
-
getMinorGridLineColor
Getter for the field
minorGridLineColor.- Specified by:
getMinorGridLineColorin classAxis- Returns:
- a
Colorobject. - See Also:
-
setMinorGridLineColor
Color of the minor, secondary grid lines. Color of the minor, secondary grid lines.Defaults to: #E0E0E0
- Specified by:
setMinorGridLineColorin classAxis- Parameters:
minorGridLineColor- aColorobject.
-
getMinorGridLineDashStyle
Getter for the field
minorGridLineDashStyle.- Specified by:
getMinorGridLineDashStylein classAxis- Returns:
- a
DashStyleobject. - See Also:
-
setMinorGridLineDashStyle
The dash or dot style of the minor grid lines. The dash or dot style of the minor grid lines. For possible values, see this demonstration.Defaults to: Solid
- Specified by:
setMinorGridLineDashStylein classAxis- Parameters:
minorGridLineDashStyle- aDashStyleobject.
-
getMinorGridLineWidth
Getter for the field
minorGridLineWidth.- Specified by:
getMinorGridLineWidthin classAxis- Returns:
- a
Numberobject. - See Also:
-
setMinorGridLineWidth
Width of the minor, secondary grid lines. Width of the minor, secondary grid lines.Defaults to: 1
- Specified by:
setMinorGridLineWidthin classAxis- Parameters:
minorGridLineWidth- aNumberobject.
-
getMinorTickColor
Getter for the field
minorTickColor.- Specified by:
getMinorTickColorin classAxis- Returns:
- a
Colorobject. - See Also:
-
setMinorTickColor
Color for the minor tick marks. Color for the minor tick marks.Defaults to: #A0A0A0
- Specified by:
setMinorTickColorin classAxis- Parameters:
minorTickColor- aColorobject.
-
getMinorTickInterval
Getter for the field
minorTickInterval.- Specified by:
getMinorTickIntervalin classAxis- 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.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.
- Specified by:
setMinorTickIntervalin classAxis- Parameters:
minorTickInterval- aStringobject.
-
getMinorTickLength
Getter for the field
minorTickLength.- Specified by:
getMinorTickLengthin classAxis- Returns:
- a
Numberobject. - See Also:
-
setMinorTickLength
The pixel length of the minor tick marks. The pixel length of the minor tick marks.Defaults to: 2
- Specified by:
setMinorTickLengthin classAxis- Parameters:
minorTickLength- aNumberobject.
-
getMinorTickPosition
Getter for the field
minorTickPosition.- Specified by:
getMinorTickPositionin classAxis- Returns:
- a
TickPositionobject. - See Also:
-
setMinorTickPosition
The position of the minor tick marks relative to the axis line. Can be one ofinsideandoutside. The position of the minor tick marks relative to the axis line. Can be one ofinsideandoutside.Defaults to: outside
- Specified by:
setMinorTickPositionin classAxis- Parameters:
minorTickPosition- aTickPositionobject.
-
getMinorTickWidth
Getter for the field
minorTickWidth.- Specified by:
getMinorTickWidthin classAxis- Returns:
- a
Numberobject. - See Also:
-
setMinorTickWidth
The pixel width of the minor tick mark. The pixel width of the minor tick mark.Defaults to: 0
- Specified by:
setMinorTickWidthin classAxis- Parameters:
minorTickWidth- aNumberobject.
-
getOffset
Getter for the field
offset.- Returns:
- a
Numberobject. - See Also:
-
setOffset
The distance in pixels from the plot area to the axis line. A positive offset moves the axis with it's line, labels and ticks away from the plot area. This is typically used when two or more axes are displayed on the same side of the plot. With multiple axes the offset is dynamically adjusted to avoid collision, this can be overridden by setting offset explicitly.Defaults to: 0
- Parameters:
offset- aNumberobject.
-
getOpposite
Getter for the field
opposite.- Returns:
- a
Booleanobject. - See Also:
-
setOpposite
Whether to display the axis on the opposite side of the normal. The normal is on the left side for vertical axes and bottom for horizontal, so the opposite sides will be right and top respectively.Defaults to: false
- Parameters:
opposite- aBooleanobject.
-
getReversed
Getter for the field
reversed.- Specified by:
getReversedin classAxis- Returns:
- a
Booleanobject. - See Also:
-
setReversed
Whether to reverse the axis so that the highest number is closest to the origin. Whether to reverse the axis so that the highest number is closest to the origin.Defaults to: false
- Specified by:
setReversedin classAxis- Parameters:
reversed- aBooleanobject.
-
getShowEmpty
Getter for the field
showEmpty.- Returns:
- a
Booleanobject. - See Also:
-
setShowEmpty
Whether to show the axis line and title when the axis has no data. By default Highmaps X and Y axis don't have visible line and title regardless.Defaults to: true
- Parameters:
showEmpty- aBooleanobject.
-
getShowFirstLabel
Getter for the field
showFirstLabel.- Specified by:
getShowFirstLabelin classAxis- Returns:
- a
Booleanobject. - See Also:
-
setShowFirstLabel
Whether to show the first tick label. If labels are enabled, whether to show the first tick label.Defaults to: true
- Specified by:
setShowFirstLabelin classAxis- Parameters:
showFirstLabel- aBooleanobject.
-
getShowLastLabel
Getter for the field
showLastLabel.- Specified by:
getShowLastLabelin classAxis- Returns:
- a
Booleanobject. - See Also:
-
setShowLastLabel
Whether to show the last tick label. If labels are enabled, whether to show the last tick label.Defaults to: true
- Specified by:
setShowLastLabelin classAxis- Parameters:
showLastLabel- aBooleanobject.
-
getStartOnTick
Getter for the field
startOnTick.- Specified by:
getStartOnTickin classAxis- 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. Whether to force the axis to start on a tick. Use this option with theminPaddingoption to control the axis start.Defaults to: false
- Specified by:
setStartOnTickin classAxis- Parameters:
startOnTick- aBooleanobject.
-
getTickColor
Getter for the field
tickColor.- Specified by:
getTickColorin classAxis- Returns:
- a
Colorobject. - See Also:
-
setTickColor
Color for the main tick marks. Color for the main tick marks.Defaults to: #C0D0E0
- Specified by:
setTickColorin classAxis- Parameters:
tickColor- aColorobject.
-
getTickInterval
Getter for the field
tickInterval.- Specified by:
getTickIntervalin classAxis- 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.
The interval of the tick marks in axis units. When
null, the tick interval is computed to approximately follow the tickPixelInterval.- Specified by:
setTickIntervalin classAxis- Parameters:
tickInterval- aNumberobject.
-
getTickLength
Getter for the field
tickLength.- Specified by:
getTickLengthin classAxis- Returns:
- a
Numberobject. - See Also:
-
setTickLength
The pixel length of the main tick marks. The pixel length of the main tick marks.Defaults to: 10
- Specified by:
setTickLengthin classAxis- Parameters:
tickLength- aNumberobject.
-
getTickPixelInterval
Getter for the field
tickPixelInterval.- Specified by:
getTickPixelIntervalin classAxis- Returns:
- a
Numberobject. - See Also:
-
setTickPixelInterval
If tickInterval isnullthis option sets the approximate pixel interval of the tick marks. Not applicable to categorized axis. If tickInterval isnullthis option sets the approximate pixel interval of the tick marks. Defaults to72for the Y axis and100for the X axis.- Specified by:
setTickPixelIntervalin classAxis- Parameters:
tickPixelInterval- aNumberobject.
-
getTickPosition
Getter for the field
tickPosition.- Specified by:
getTickPositionin classAxis- Returns:
- a
TickPositionobject. - See Also:
-
setTickPosition
The position of the major tick marks relative to the axis line. Can be one ofinsideandoutside. The position of the major tick marks relative to the axis line. Can be one ofinsideandoutside.Defaults to: outside
- Specified by:
setTickPositionin classAxis- Parameters:
tickPosition- aTickPositionobject.
-
getTickPositions
Getter for the field
tickPositions.- Specified by:
getTickPositionsin classAxis- 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.- Specified by:
setTickPositionsin classAxis- Parameters:
tickPositions- an array ofNumberobjects.
-
getTickWidth
Getter for the field
tickWidth.- Specified by:
getTickWidthin classAxis- Returns:
- a
Numberobject. - See Also:
-
setTickWidth
The pixel width of the major tick marks. The pixel width of the major tick marks.Defaults to: 0
- Specified by:
setTickWidthin classAxis- Parameters:
tickWidth- aNumberobject.
-
getTitle
Getter for the field
title.- Returns:
- a
AxisTitleobject. - See Also:
-
setTitle
The axis title. In Highmaps, the axis is hidden by default, but adding an axis title is still possible. X axis and Y axis titles will appear at the bottom and left by default.- Parameters:
title- aAxisTitleobject.
-
setTitle
Setter for the field
title.- Parameters:
title- aStringobject.
-