Class XAxis
- java.lang.Object
-
- com.vaadin.flow.component.charts.model.AbstractConfigurationObject
-
- com.vaadin.flow.component.charts.model.Axis
-
- com.vaadin.flow.component.charts.model.XAxis
-
- All Implemented Interfaces:
Serializable
public class XAxis extends Axis
The X axis or category axis. Normally this is the horizontal axis, though if the chart is inverted this is the vertical axis. In case of multiple axes, the xAxis node is an array of configuration objects.
See the Axis object for programmatic access to the axis.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.vaadin.flow.component.charts.model.Axis
max, min, MINOR_TICK_INTERVAL_AUTO
-
-
Constructor Summary
Constructors Constructor Description XAxis()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCategory(String category)Adds category to the categories arrayvoidaddPlotBand(PlotBand plotBand)Adds plotBand to the plotBands arrayvoidaddPlotLine(PlotLine plotLine)Adds plotLine to the plotLines arrayvoidaddUnit(TimeUnitMultiples unit)Adds unit to the units arrayBooleangetAllowDecimals()ColorgetAlternateGridColor()Breaks[]getBreaks()String[]getCategories()NumbergetCeiling()StringgetClassName()CrosshairgetCrosshair()DateTimeLabelFormatsgetDateTimeLabelFormats()StringgetDescription()BooleangetEndOnTick()NumbergetFloor()ColorgetGridLineColor()DashStylegetGridLineDashStyle()NumbergetGridLineWidth()NumbergetGridZIndex()StringgetId()LabelsgetLabels()ColorgetLineColor()NumbergetLineWidth()NumbergetLinkedTo()NumbergetMaxPadding()ColorgetMinorGridLineColor()DashStylegetMinorGridLineDashStyle()NumbergetMinorGridLineWidth()ColorgetMinorTickColor()StringgetMinorTickInterval()NumbergetMinorTickLength()TickPositiongetMinorTickPosition()NumbergetMinorTickWidth()NumbergetMinPadding()NumbergetMinRange()NumbergetMinTickInterval()NumbergetOffset()BooleangetOpposite()BooleangetOrdinal()NumbergetPane()PlotBand[]getPlotBands()PlotLine[]getPlotLines()NumbergetRange()BooleangetReversed()BooleangetShowEmpty()BooleangetShowFirstLabel()BooleangetShowLastLabel()NumbergetSoftMax()NumbergetSoftMin()NumbergetStartOfWeek()BooleangetStartOnTick()NumbergetTickAmount()ColorgetTickColor()NumbergetTickInterval()NumbergetTickLength()TickmarkPlacementgetTickmarkPlacement()NumbergetTickPixelInterval()TickPositiongetTickPosition()Number[]getTickPositions()NumbergetTickWidth()AxisTitlegetTitle()AxisTypegetType()BooleangetUniqueNames()TimeUnitMultiples[]getUnits()BooleangetVisible()voidremoveCategory(String category)Removes first occurrence of category in categories arrayvoidremovePlotBand(PlotBand plotBand)Removes first occurrence of plotBand in plotBands arrayvoidremovePlotLine(PlotLine plotLine)Removes first occurrence of plotLine in plotLines arrayvoidremoveUnit(TimeUnitMultiples unit)Removes first occurrence of unit in units arrayvoidsetAllowDecimals(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.voidsetBreaks(Breaks[] breaks)An array defining breaks in the axis, the sections defined will be left out and all the points shifted closer to each other.voidsetCategories(String... categories)If categories are present for the xAxis, names are used instead of numbers for that axis.voidsetCeiling(Number ceiling)The highest allowed value for automatically computed axis extremes.voidsetClassName(String className)A class name that opens for styling the axis by CSS, especially in Highcharts styled mode.voidsetCrosshair(Crosshair crosshair)Configure a crosshair that follows either the mouse pointer or the hovered point.voidsetDateTimeLabelFormats(DateTimeLabelFormats dateTimeLabelFormats)For a datetime axis, the scale will automatically adjust to the appropriate unit.voidsetDescription(String description)Requires Accessibility modulevoidsetEndOnTick(Boolean endOnTick)Whether to force the axis to end on a tick.voidsetFloor(Number floor)The lowest allowed value for automatically computed axis extremes.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.voidsetGridZIndex(Number gridZIndex)The Z index of the grid lines.voidsetId(String id)An id for the axis.voidsetLabels(Labels labels)The 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.voidsetLinkedTo(XAxis axis)voidsetLinkedTo(Number linkedTo)Index of another axis that this axis is linked to.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.voidsetOffset(Number offset)The 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.voidsetOrdinal(Boolean ordinal)In an ordinal axis, the points are equally spaced in the chart regardless of the actual time or x distance between them.voidsetPane(Pane pane)voidsetPane(Number pane)voidsetPlotBands(PlotBand... plotBands)An array of colored bands stretching across the plot area marking an interval on the axis.voidsetPlotLines(PlotLine... plotLines)An array of lines stretching across the plot area, marking a specific value on one of the axes.voidsetRange(Number range)The zoomed range to display when only defining one or none ofminormax.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.voidsetSoftMax(Number softMax)A soft maximum for the axis.voidsetSoftMin(Number softMin)A soft minimum for the axis.voidsetStartOfWeek(Number startOfWeek)For datetime axes, this decides where to put the tick between weeks.voidsetStartOnTick(Boolean startOnTick)Whether to force the axis to start on a tick.voidsetTickAmount(Number tickAmount)The amount of ticks to draw on the axis.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.voidsetTickmarkPlacement(TickmarkPlacement tickmarkPlacement)For categorized axes only.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.voidsetTitle(AxisTitle title)The axis title, showing next to the axis line.voidsetTitle(String title)voidsetType(AxisType type)The type of axis.voidsetUniqueNames(Boolean uniqueNames)Applies only when the axistypeiscategory.voidsetUnits(TimeUnitMultiples... units)Datetime axis only.voidsetVisible(Boolean visible)Whether axis, including axis title, line, ticks and labels, should be visible.-
Methods inherited from class com.vaadin.flow.component.charts.model.Axis
getAxisIndex, getConfiguration, getMax, getMin, setAxisIndex, setConfiguration, setExtremes, setExtremes, setExtremes, setExtremes, setExtremes, setExtremes, setMax, setMax, setMin, setMin
-
-
-
-
Method Detail
-
getAllowDecimals
public Boolean getAllowDecimals()
- Specified by:
getAllowDecimalsin classAxis- See Also:
setAllowDecimals(Boolean)
-
setAllowDecimals
public void setAllowDecimals(Boolean allowDecimals)
Whether to allow decimals in this axis' ticks. When counting integers, like persons or hits on a web page, decimals should be avoided in the labels.Defaults to: true
- Specified by:
setAllowDecimalsin classAxis
-
getAlternateGridColor
public Color getAlternateGridColor()
- Specified by:
getAlternateGridColorin classAxis- See Also:
setAlternateGridColor(Color)
-
setAlternateGridColor
public void setAlternateGridColor(Color alternateGridColor)
When using an alternate grid color, a band is painted across the plot area between every other grid line.- Specified by:
setAlternateGridColorin classAxis
-
getBreaks
public Breaks[] getBreaks()
- See Also:
setBreaks(Breaks[])
-
setBreaks
public void setBreaks(Breaks[] breaks)
An array defining breaks in the axis, the sections defined will be left out and all the points shifted closer to each other. Requires that the broken-axis.js module is loaded.
-
getCategories
public String[] getCategories()
- Specified by:
getCategoriesin classAxis- See Also:
setCategories(String...)
-
setCategories
public void setCategories(String... categories)
If categories are present for the xAxis, names are used instead of numbers for that axis. Since Highcharts 3.0, categories can also be extracted by giving each point a name and setting axis type to
category. However, if you have multiple series, best practice remains defining thecategoriesarray.Example:
categories: ['Apples', 'Bananas', 'Oranges']
Defaults tonull- Specified by:
setCategoriesin classAxis
-
addCategory
public void addCategory(String category)
Adds category to the categories array- Specified by:
addCategoryin classAxis- Parameters:
category- to add- See Also:
setCategories(String...)
-
removeCategory
public void removeCategory(String category)
Removes first occurrence of category in categories array- Specified by:
removeCategoryin classAxis- Parameters:
category- to remove- See Also:
setCategories(String...)
-
getCeiling
public Number getCeiling()
- Specified by:
getCeilingin classAxis- See Also:
setCeiling(Number)
-
setCeiling
public void setCeiling(Number ceiling)
The highest allowed value for automatically computed axis extremes.- Specified by:
setCeilingin classAxis
-
getClassName
public String getClassName()
- Specified by:
getClassNamein classAxis- See Also:
setClassName(String)
-
setClassName
public void setClassName(String className)
A class name that opens for styling the axis by CSS, especially in Highcharts styled mode. The class name is applied to group elements for the grid, axis elements and labels.- Specified by:
setClassNamein classAxis
-
getCrosshair
public Crosshair getCrosshair()
- Specified by:
getCrosshairin classAxis- See Also:
setCrosshair(Crosshair)
-
setCrosshair
public void setCrosshair(Crosshair crosshair)
Configure a crosshair that follows either the mouse pointer or the hovered point.
In styled mode, the crosshairs are styled in the
.highcharts-crosshair,.highcharts-crosshair-thinor.highcharts-xaxis-categoryclasses.Defaults to: false
- Specified by:
setCrosshairin classAxis
-
getDateTimeLabelFormats
public DateTimeLabelFormats getDateTimeLabelFormats()
- Specified by:
getDateTimeLabelFormatsin classAxis- See Also:
setDateTimeLabelFormats(DateTimeLabelFormats)
-
setDateTimeLabelFormats
public void setDateTimeLabelFormats(DateTimeLabelFormats dateTimeLabelFormats)
For a datetime axis, the scale will automatically adjust to the appropriate unit. This member gives the default string representations used for each unit. For intermediate values, different units may be used, for example thedayunit can be used on midnight andhourunit be used for intermediate values on the same axis. For an overview of the replacement codes, see dateFormat. Defaults to:{ millisecond: '%H:%M:%S.%L', second: '%H:%M:%S', minute: '%H:%M', hour: '%H:%M', day: '%e. %b', week: '%e. %b', month: '%b \'%y', year: '%Y' }- Specified by:
setDateTimeLabelFormatsin classAxis
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin classAxis- See Also:
setDescription(String)
-
setDescription
public void setDescription(String description)
Requires Accessibility module
Description of the axis to screen reader users.
Defaults to: undefined
- Specified by:
setDescriptionin classAxis
-
getEndOnTick
public Boolean getEndOnTick()
- Specified by:
getEndOnTickin classAxis- See Also:
setEndOnTick(Boolean)
-
setEndOnTick
public void setEndOnTick(Boolean endOnTick)
Whether to force the axis to end on a tick. Use this option with themaxPaddingoption to control the axis end.Defaults to: false
- Specified by:
setEndOnTickin classAxis
-
getFloor
public Number getFloor()
- Specified by:
getFloorin classAxis- See Also:
setFloor(Number)
-
setFloor
public void setFloor(Number floor)
The lowest allowed value for automatically computed axis extremes.Defaults to: null
-
getGridLineColor
public Color getGridLineColor()
- See Also:
setGridLineColor(Color)
-
setGridLineColor
public void setGridLineColor(Color gridLineColor)
Color of the grid lines extending the ticks across the plot area.
In styled mode, the stroke is given in the
.highcharts-grid-lineclass.Defaults to: #e6e6e6
-
getGridLineDashStyle
public DashStyle getGridLineDashStyle()
- See Also:
setGridLineDashStyle(DashStyle)
-
setGridLineDashStyle
public void setGridLineDashStyle(DashStyle gridLineDashStyle)
The dash or dot style of the grid lines. For possible values, see this demonstration.Defaults to: Solid
-
getGridLineWidth
public Number getGridLineWidth()
- See Also:
setGridLineWidth(Number)
-
setGridLineWidth
public void setGridLineWidth(Number gridLineWidth)
The width of the grid lines extending the ticks across the plot area.
In styled mode, the stroke width is given in the
.highcharts-grid-lineclass.Defaults to: 0
-
getGridZIndex
public Number getGridZIndex()
- Specified by:
getGridZIndexin classAxis- See Also:
setGridZIndex(Number)
-
setGridZIndex
public void setGridZIndex(Number gridZIndex)
The Z index of the grid lines.Defaults to: 1
- Specified by:
setGridZIndexin classAxis
-
getId
public String getId()
- Specified by:
getIdin classAxis- See Also:
setId(String)
-
setId
public void setId(String id)
An id for the axis. This can be used after render time to get a pointer to the axis object throughchart.get().
-
getLabels
public Labels getLabels()
- Specified by:
getLabelsin classAxis- See Also:
setLabels(Labels)
-
setLabels
public void setLabels(Labels labels)
The axis labels show the number or category for each tick.
-
getLineColor
public Color getLineColor()
- Specified by:
getLineColorin classAxis- See Also:
setLineColor(Color)
-
setLineColor
public void setLineColor(Color lineColor)
The color of the line marking the axis itself.
In styled mode, the line stroke is given in the
.highcharts-axis-lineor.highcharts-xaxis-lineclass.Defaults to: #ccd6eb
- Specified by:
setLineColorin classAxis
-
getLineWidth
public Number getLineWidth()
- Specified by:
getLineWidthin classAxis- See Also:
setLineWidth(Number)
-
setLineWidth
public void setLineWidth(Number lineWidth)
The width of the line marking the axis itself.
In styled mode, the stroke width is given in the
.highcharts-axis-lineor.highcharts-xaxis-lineclass.Defaults to: 1
- Specified by:
setLineWidthin classAxis
-
getLinkedTo
public Number getLinkedTo()
- Specified by:
getLinkedToin classAxis- See Also:
setLinkedTo(Number)
-
setLinkedTo
public void setLinkedTo(Number linkedTo)
Index of another axis that this axis is linked to. When an axis is linked to a master axis, it will take the same extremes as the master, but as assigned by min or max or by setExtremes. It can be used to show additional info, or to ease reading the chart by duplicating the scales.- Specified by:
setLinkedToin classAxis
-
getMaxPadding
public Number getMaxPadding()
- Specified by:
getMaxPaddingin classAxis- See Also:
setMaxPadding(Number)
-
setMaxPadding
public void setMaxPadding(Number 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. 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.Defaults to: 0.01
- Specified by:
setMaxPaddingin classAxis
-
getMinPadding
public Number getMinPadding()
- Specified by:
getMinPaddingin classAxis- See Also:
setMinPadding(Number)
-
setMinPadding
public void setMinPadding(Number 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. 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.Defaults to: 0.01
- Specified by:
setMinPaddingin classAxis
-
getMinRange
public Number getMinRange()
- Specified by:
getMinRangein classAxis- See Also:
setMinRange(Number)
-
setMinRange
public void setMinRange(Number minRange)
The minimum range to display on this axis. The entire axis will not be allowed to span over a smaller interval than this. For example, for a datetime axis the main unit is milliseconds. If minRange is set to 3600000, you can't zoom in more than to one hour.
The default minRange for the x axis is five times the smallest interval between any of the data points.
On a logarithmic axis, the unit for the minimum range is the power. So a minRange of 1 means that the axis can be zoomed to 10-100, 100-1000, 1000-10000 etc.
Note that the
minPadding,maxPadding,startOnTickandendOnTicksettings also affect how the extremes of the axis are computed.- Specified by:
setMinRangein classAxis
-
getMinTickInterval
public Number getMinTickInterval()
- Specified by:
getMinTickIntervalin classAxis- See Also:
setMinTickInterval(Number)
-
setMinTickInterval
public void setMinTickInterval(Number minTickInterval)
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. Defaults to the closest distance between two points on the axis.- Specified by:
setMinTickIntervalin classAxis
-
getMinorGridLineColor
public Color getMinorGridLineColor()
- See Also:
setMinorGridLineColor(Color)
-
setMinorGridLineColor
public void setMinorGridLineColor(Color minorGridLineColor)
Color of the minor, secondary grid lines.
In styled mode, the stroke width is given in the
.highcharts-minor-grid-lineclass.Defaults to: #f2f2f2
-
getMinorGridLineDashStyle
public DashStyle getMinorGridLineDashStyle()
- See Also:
setMinorGridLineDashStyle(DashStyle)
-
setMinorGridLineDashStyle
public void setMinorGridLineDashStyle(DashStyle minorGridLineDashStyle)
The dash or dot style of the minor grid lines. For possible values, see this demonstration.Defaults to: Solid
-
getMinorGridLineWidth
public Number getMinorGridLineWidth()
- See Also:
setMinorGridLineWidth(Number)
-
setMinorGridLineWidth
public void setMinorGridLineWidth(Number minorGridLineWidth)
Width of the minor, secondary grid lines.
In styled mode, the stroke width is given in the
.highcharts-grid-lineclass.Defaults to: 1
-
getMinorTickColor
public Color getMinorTickColor()
- See Also:
setMinorTickColor(Color)
-
setMinorTickColor
public void setMinorTickColor(Color minorTickColor)
Color for the minor tick marks.Defaults to: #999999
-
getMinorTickInterval
public String getMinorTickInterval()
- Specified by:
getMinorTickIntervalin classAxis- See Also:
setMinorTickInterval(String)
-
setMinorTickInterval
public void setMinorTickInterval(String 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. 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.
- Specified by:
setMinorTickIntervalin classAxis
-
getMinorTickLength
public Number getMinorTickLength()
- Specified by:
getMinorTickLengthin classAxis- See Also:
setMinorTickLength(Number)
-
setMinorTickLength
public void setMinorTickLength(Number minorTickLength)
The pixel length of the minor tick marks.Defaults to: 2
- Specified by:
setMinorTickLengthin classAxis
-
getMinorTickPosition
public TickPosition getMinorTickPosition()
- Specified by:
getMinorTickPositionin classAxis- See Also:
setMinorTickPosition(TickPosition)
-
setMinorTickPosition
public void setMinorTickPosition(TickPosition minorTickPosition)
The position of the minor tick marks relative to the axis line. Can be one ofinsideandoutside.Defaults to: outside
- Specified by:
setMinorTickPositionin classAxis
-
getMinorTickWidth
public Number getMinorTickWidth()
- See Also:
setMinorTickWidth(Number)
-
setMinorTickWidth
public void setMinorTickWidth(Number minorTickWidth)
The pixel width of the minor tick mark.Defaults to: 0
-
getOffset
public Number getOffset()
- Specified by:
getOffsetin classAxis- See Also:
setOffset(Number)
-
setOffset
public void setOffset(Number offset)
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
-
getOpposite
public Boolean getOpposite()
- Specified by:
getOppositein classAxis- See Also:
setOpposite(Boolean)
-
setOpposite
public void setOpposite(Boolean opposite)
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. This is typically used with dual or multiple axes.Defaults to: false
- Specified by:
setOppositein classAxis
-
getPlotBands
public PlotBand[] getPlotBands()
- Specified by:
getPlotBandsin classAxis- See Also:
setPlotBands(PlotBand...)
-
setPlotBands
public void setPlotBands(PlotBand... plotBands)
An array of colored bands stretching across the plot area marking an interval on the axis.
In a gauge, a plot band on the Y axis (value axis) will stretch along the perimeter of the gauge.
In styled mode, the plot bands are styled by the
.highcharts-plot-bandclass in addition to theclassNameoption.- Specified by:
setPlotBandsin classAxis
-
addPlotBand
public void addPlotBand(PlotBand plotBand)
Adds plotBand to the plotBands array- Specified by:
addPlotBandin classAxis- Parameters:
plotBand- to add- See Also:
setPlotBands(PlotBand...)
-
removePlotBand
public void removePlotBand(PlotBand plotBand)
Removes first occurrence of plotBand in plotBands array- Specified by:
removePlotBandin classAxis- Parameters:
plotBand- to remove- See Also:
setPlotBands(PlotBand...)
-
getPlotLines
public PlotLine[] getPlotLines()
- Specified by:
getPlotLinesin classAxis- See Also:
setPlotLines(PlotLine...)
-
setPlotLines
public void setPlotLines(PlotLine... plotLines)
An array of lines stretching across the plot area, marking a specific value on one of the axes.
In styled mode, the plot lines are styled by the
.highcharts-plot-lineclass in addition to theclassNameoption.- Specified by:
setPlotLinesin classAxis
-
addPlotLine
public void addPlotLine(PlotLine plotLine)
Adds plotLine to the plotLines array- Specified by:
addPlotLinein classAxis- Parameters:
plotLine- to add- See Also:
setPlotLines(PlotLine...)
-
removePlotLine
public void removePlotLine(PlotLine plotLine)
Removes first occurrence of plotLine in plotLines array- Specified by:
removePlotLinein classAxis- Parameters:
plotLine- to remove- See Also:
setPlotLines(PlotLine...)
-
getReversed
public Boolean getReversed()
- Specified by:
getReversedin classAxis- See Also:
setReversed(Boolean)
-
setReversed
public void setReversed(Boolean reversed)
Whether to reverse the axis so that the highest number is closest to the origin. If the chart is inverted, the x axis is reversed by default.Defaults to: false
- Specified by:
setReversedin classAxis
-
getShowEmpty
public Boolean getShowEmpty()
- Specified by:
getShowEmptyin classAxis- See Also:
setShowEmpty(Boolean)
-
setShowEmpty
public void setShowEmpty(Boolean showEmpty)
Whether to show the axis line and title when the axis has no data.Defaults to: true
- Specified by:
setShowEmptyin classAxis
-
getShowFirstLabel
public Boolean getShowFirstLabel()
- Specified by:
getShowFirstLabelin classAxis- See Also:
setShowFirstLabel(Boolean)
-
setShowFirstLabel
public void setShowFirstLabel(Boolean showFirstLabel)
Whether to show the first tick label.Defaults to: true
- Specified by:
setShowFirstLabelin classAxis
-
getShowLastLabel
public Boolean getShowLastLabel()
- Specified by:
getShowLastLabelin classAxis- See Also:
setShowLastLabel(Boolean)
-
setShowLastLabel
public void setShowLastLabel(Boolean showLastLabel)
Whether to show the last tick label.Defaults to: true
- Specified by:
setShowLastLabelin classAxis
-
getSoftMax
public Number getSoftMax()
- Specified by:
getSoftMaxin classAxis- See Also:
setSoftMax(Number)
-
setSoftMax
public void setSoftMax(Number softMax)
A soft maximum for the axis. If the series data maximum is less than this, the axis will stay at this maximum, but if the series data maximum is higher, the axis will flex to show all data.- Specified by:
setSoftMaxin classAxis
-
getSoftMin
public Number getSoftMin()
- Specified by:
getSoftMinin classAxis- See Also:
setSoftMin(Number)
-
setSoftMin
public void setSoftMin(Number softMin)
A soft minimum for the axis. If the series data minimum is greater than this, the axis will stay at this minimum, but if the series data minimum is lower, the axis will flex to show all data.- Specified by:
setSoftMinin classAxis
-
getStartOfWeek
public Number getStartOfWeek()
- Specified by:
getStartOfWeekin classAxis- See Also:
setStartOfWeek(Number)
-
setStartOfWeek
public void setStartOfWeek(Number startOfWeek)
For datetime axes, this decides where to put the tick between weeks. 0 = Sunday, 1 = Monday.Defaults to: 1
- Specified by:
setStartOfWeekin classAxis
-
getStartOnTick
public Boolean getStartOnTick()
- Specified by:
getStartOnTickin classAxis- See Also:
setStartOnTick(Boolean)
-
setStartOnTick
public void setStartOnTick(Boolean startOnTick)
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
-
getTickAmount
public Number getTickAmount()
- Specified by:
getTickAmountin classAxis- See Also:
setTickAmount(Number)
-
setTickAmount
public void setTickAmount(Number tickAmount)
The amount of ticks to draw on the axis. This opens up for aligning the ticks of multiple charts or panes within a chart. This option overrides the
tickPixelIntervaloption.This option only has an effect on linear axes. Datetime, logarithmic or category axes are not affected.
- Specified by:
setTickAmountin classAxis
-
getTickColor
public Color getTickColor()
- Specified by:
getTickColorin classAxis- See Also:
setTickColor(Color)
-
setTickColor
public void setTickColor(Color tickColor)
Color for the main tick marks.
In styled mode, the stroke is given in the
.highcharts-tickclass.Defaults to: #ccd6eb
- Specified by:
setTickColorin classAxis
-
getTickInterval
public Number getTickInterval()
- Specified by:
getTickIntervalin classAxis- See Also:
setTickInterval(Number)
-
setTickInterval
public void setTickInterval(Number tickInterval)
The interval of the tick marks in axis units. When
null, the tick interval is computed to approximately follow the tickPixelInterval on 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.
If the chart has multiple axes, the alignTicks option may interfere with the
tickIntervalsetting.- Specified by:
setTickIntervalin classAxis
-
getTickLength
public Number getTickLength()
- Specified by:
getTickLengthin classAxis- See Also:
setTickLength(Number)
-
setTickLength
public void setTickLength(Number tickLength)
The pixel length of the main tick marks.Defaults to: 10
- Specified by:
setTickLengthin classAxis
-
getTickPixelInterval
public Number getTickPixelInterval()
- Specified by:
getTickPixelIntervalin classAxis- See Also:
setTickPixelInterval(Number)
-
setTickPixelInterval
public void setTickPixelInterval(Number tickPixelInterval)
If tickInterval is
nullthis option sets the approximate pixel interval of the tick marks. Not applicable to categorized axis.The tick interval is also influenced by the minTickInterval option, that, by default prevents ticks from being denser than the data points.
Defaults to
72for the Y axis and100for the X axis.- Specified by:
setTickPixelIntervalin classAxis
-
getTickPosition
public TickPosition getTickPosition()
- Specified by:
getTickPositionin classAxis- See Also:
setTickPosition(TickPosition)
-
setTickPosition
public void setTickPosition(TickPosition tickPosition)
The position of the major tick marks relative to the axis line. Can be one ofinsideandoutside.Defaults to: outside
- Specified by:
setTickPositionin classAxis
-
getTickPositions
public Number[] getTickPositions()
- Specified by:
getTickPositionsin classAxis- See Also:
setTickPositions(Number[])
-
setTickPositions
public void setTickPositions(Number[] tickPositions)
An array defining where the ticks are laid out on the axis. This overrides the default behaviour of tickPixelInterval and tickInterval.- Specified by:
setTickPositionsin classAxis
-
getTickWidth
public Number getTickWidth()
- See Also:
setTickWidth(Number)
-
setTickWidth
public void setTickWidth(Number tickWidth)
The pixel width of the major tick marks.
In styled mode, the stroke width is given in the
.highcharts-tickclass.Defaults to: 1
-
getTickmarkPlacement
public TickmarkPlacement getTickmarkPlacement()
- Specified by:
getTickmarkPlacementin classAxis- See Also:
setTickmarkPlacement(TickmarkPlacement)
-
setTickmarkPlacement
public void setTickmarkPlacement(TickmarkPlacement tickmarkPlacement)
For categorized axes only. Ifonthe tick mark is placed in the center of the category, ifbetweenthe tick mark is placed between categories. The default isbetweenif thetickIntervalis 1, elseon.Defaults to: null
- Specified by:
setTickmarkPlacementin classAxis
-
getTitle
public AxisTitle getTitle()
- Specified by:
getTitlein classAxis- See Also:
setTitle(AxisTitle)
-
setTitle
public void setTitle(AxisTitle title)
The axis title, showing next to the axis line.
-
getType
public AxisType getType()
- Specified by:
getTypein classAxis- See Also:
setType(AxisType)
-
setType
public void setType(AxisType type)
The type of axis. Can be one oflinear,logarithmic,datetimeorcategory. In a datetime axis, the numbers are given in milliseconds, and tick marks are placed on appropriate values like full hours or days. In a category axis, the point names of the chart's series are used for categories, if not a categories array is defined.Defaults to: linear
-
getUniqueNames
public Boolean getUniqueNames()
- Specified by:
getUniqueNamesin classAxis- See Also:
setUniqueNames(Boolean)
-
setUniqueNames
public void setUniqueNames(Boolean uniqueNames)
Applies only when the axistypeiscategory. WhenuniqueNamesis true, points are placed on the X axis according to their names. If the same point name is repeated in the same or another series, the point is placed on the same X position as other points of the same name. WhenuniqueNamesis false, the points are laid out in increasing X positions regardless of their names, and the X axis category will take the name of the last point in each position.Defaults to: true
- Specified by:
setUniqueNamesin classAxis
-
getUnits
public TimeUnitMultiples[] getUnits()
- Specified by:
getUnitsin classAxis- See Also:
setUnits(TimeUnitMultiples...)
-
setUnits
public void setUnits(TimeUnitMultiples... units)
Datetime axis only. An array determining what time intervals the ticks are allowed to fall on. Each array item is an array where the first value is the time unit and the second value another array of allowed multiples. Defaults to:units: [[ 'millisecond', // unit name [1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples ], [ 'second', [1, 2, 5, 10, 15, 30] ], [ 'minute', [1, 2, 5, 10, 15, 30] ], [ 'hour', [1, 2, 3, 4, 6, 8, 12] ], [ 'day', [1] ], [ 'week', [1] ], [ 'month', [1, 3, 6] ], [ 'year', null ]]
-
addUnit
public void addUnit(TimeUnitMultiples unit)
Adds unit to the units array- Specified by:
addUnitin classAxis- Parameters:
unit- to add- See Also:
setUnits(TimeUnitMultiples...)
-
removeUnit
public void removeUnit(TimeUnitMultiples unit)
Removes first occurrence of unit in units array- Specified by:
removeUnitin classAxis- Parameters:
unit- to remove- See Also:
setUnits(TimeUnitMultiples...)
-
getVisible
public Boolean getVisible()
- Specified by:
getVisiblein classAxis- See Also:
setVisible(Boolean)
-
setVisible
public void setVisible(Boolean visible)
Whether axis, including axis title, line, ticks and labels, should be visible.Defaults to: true
- Specified by:
setVisiblein classAxis
-
getOrdinal
public Boolean getOrdinal()
- See Also:
setOrdinal(Boolean)
-
setOrdinal
public void setOrdinal(Boolean ordinal)
In an ordinal axis, the points are equally spaced in the chart regardless of the actual time or x distance between them. This means that missing data for nights or weekends will not take up space in the chart.Defaults to: true
-
getRange
public Number getRange()
- See Also:
setRange(Number)
-
setRange
public void setRange(Number range)
The zoomed range to display when only defining one or none ofminormax. For example, to show the latest month, a range of one month can be set.Defaults to: undefined
-
getPane
public Number getPane()
-
setPane
public void setPane(Number pane)
-
setPane
public void setPane(Pane pane)
-
setLinkedTo
public void setLinkedTo(XAxis axis)
-
-