public class ZAxis extends Axis
The Z axis or depth axis for 3D plots.
See the Axis object for programmatic access to the axis.
max, min, MINOR_TICK_INTERVAL_AUTO| Constructor and Description |
|---|
ZAxis() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCategory(String category)
Adds category to the categories array
|
void |
addPlotBand(PlotBand plotBand)
Adds plotBand to the plotBands array
|
void |
addPlotLine(PlotLine plotLine)
Adds plotLine to the plotLines array
|
void |
addUnit(TimeUnitMultiples unit)
Adds unit to the units array
|
Boolean |
getAllowDecimals() |
Boolean |
getAlternateGridColor() |
String[] |
getCategories() |
Number |
getCeiling() |
String |
getClassName() |
Crosshair |
getCrosshair() |
DateTimeLabelFormats |
getDateTimeLabelFormats() |
String |
getDescription() |
Boolean |
getEndOnTick() |
Number |
getFloor() |
Number |
getGridZIndex() |
String |
getId() |
Labels |
getLabels() |
Number |
getLinkedTo() |
Number |
getMaxPadding() |
String |
getMinorTickInterval() |
Number |
getMinorTickLength() |
TickPosition |
getMinorTickPosition() |
Number |
getMinPadding() |
Number |
getMinRange() |
Number |
getMinTickInterval() |
Number |
getOffset() |
Boolean |
getOpposite() |
PlotBand[] |
getPlotBands() |
PlotLine[] |
getPlotLines() |
Boolean |
getReversed() |
Boolean |
getShowEmpty() |
Boolean |
getShowFirstLabel() |
Boolean |
getShowLastLabel() |
Number |
getSoftMax() |
Number |
getSoftMin() |
Number |
getStartOfWeek() |
Boolean |
getStartOnTick() |
Number |
getTickAmount() |
Number |
getTickInterval() |
Number |
getTickLength() |
TickmarkPlacement |
getTickmarkPlacement() |
Number |
getTickPixelInterval() |
TickPosition |
getTickPosition() |
Number[] |
getTickPositions() |
AxisTitle |
getTitle() |
AxisType |
getType() |
Boolean |
getUniqueNames() |
TimeUnitMultiples[] |
getUnits() |
Boolean |
getVisible() |
void |
removeCategory(String category)
Removes first occurrence of category in categories array
|
void |
removePlotBand(PlotBand plotBand)
Removes first occurrence of plotBand in plotBands array
|
void |
removePlotLine(PlotLine plotLine)
Removes first occurrence of plotLine in plotLines array
|
void |
removeUnit(TimeUnitMultiples unit)
Removes first occurrence of unit in units array
|
void |
setAllowDecimals(Boolean allowDecimals)
Whether to allow decimals in this axis' ticks.
|
void |
setAlternateGridColor(Boolean alternateGridColor)
When using an alternate grid color, a band is painted across the plot
area between every other grid line.
|
void |
setCategories(String... categories)
If categories are present for the xAxis, names are used instead of
numbers for that axis.
|
void |
setCeiling(Number ceiling)
The highest allowed value for automatically computed axis extremes.
|
void |
setClassName(String className)
A class name that opens for styling the axis by CSS, especially in
Highcharts styled mode.
|
void |
setCrosshair(Crosshair crosshair)
Configure a crosshair that follows either the mouse pointer or the
hovered point.
|
void |
setDateTimeLabelFormats(DateTimeLabelFormats dateTimeLabelFormats)
For a datetime axis, the scale will automatically adjust to the
appropriate unit.
|
void |
setDescription(String description)
Requires Accessibility module
|
void |
setEndOnTick(Boolean endOnTick)
Whether to force the axis to end on a tick.
|
void |
setFloor(Number floor)
The lowest allowed value for automatically computed axis extremes.
|
void |
setGridZIndex(Number gridZIndex)
The Z index of the grid lines.
|
void |
setId(String id)
An id for the axis.
|
void |
setLabels(Labels labels)
The axis labels show the number or category for each tick.
|
void |
setLinkedTo(Number linkedTo)
Index of another axis that this axis is linked to.
|
void |
setLinkedTo(ZAxis axis) |
void |
setMaxPadding(Number maxPadding)
Padding of the max value relative to the length of the axis.
|
void |
setMinorTickInterval(String minorTickInterval)
Tick interval in scale units for the minor ticks.
|
void |
setMinorTickLength(Number minorTickLength)
The pixel length of the minor tick marks.
|
void |
setMinorTickPosition(TickPosition minorTickPosition)
The position of the minor tick marks relative to the axis line.
|
void |
setMinPadding(Number minPadding)
Padding of the min value relative to the length of the axis.
|
void |
setMinRange(Number minRange)
The minimum range to display on this axis.
|
void |
setMinTickInterval(Number minTickInterval)
The minimum tick interval allowed in axis values.
|
void |
setOffset(Number offset)
The distance in pixels from the plot area to the axis line.
|
void |
setOpposite(Boolean opposite)
Whether to display the axis on the opposite side of the normal.
|
void |
setPlotBands(PlotBand... plotBands)
An array of colored bands stretching across the plot area marking an
interval on the axis.
|
void |
setPlotLines(PlotLine... plotLines)
An array of lines stretching across the plot area, marking a specific
value on one of the axes.
|
void |
setReversed(Boolean reversed)
Whether to reverse the axis so that the highest number is closest to the
origin.
|
void |
setShowEmpty(Boolean showEmpty)
Whether to show the axis line and title when the axis has no data.
|
void |
setShowFirstLabel(Boolean showFirstLabel)
Whether to show the first tick label.
|
void |
setShowLastLabel(Boolean showLastLabel)
Whether to show the last tick label.
|
void |
setSoftMax(Number softMax)
A soft maximum for the axis.
|
void |
setSoftMin(Number softMin)
A soft minimum for the axis.
|
void |
setStartOfWeek(Number startOfWeek)
For datetime axes, this decides where to put the tick between weeks.
|
void |
setStartOnTick(Boolean startOnTick)
Whether to force the axis to start on a tick.
|
void |
setTickAmount(Number tickAmount)
The amount of ticks to draw on the axis.
|
void |
setTickInterval(Number tickInterval)
The interval of the tick marks in axis units.
|
void |
setTickLength(Number tickLength)
The pixel length of the main tick marks.
|
void |
setTickmarkPlacement(TickmarkPlacement tickmarkPlacement)
For categorized axes only.
|
void |
setTickPixelInterval(Number tickPixelInterval)
If tickInterval is
null this option sets the approximate
pixel interval of the tick marks. |
void |
setTickPosition(TickPosition tickPosition)
The position of the major tick marks relative to the axis line.
|
void |
setTickPositions(Number[] tickPositions)
An array defining where the ticks are laid out on the axis.
|
void |
setTitle(AxisTitle title)
The axis title, showing next to the axis line.
|
void |
setTitle(String title) |
void |
setType(AxisType type)
The type of axis.
|
void |
setUniqueNames(Boolean uniqueNames)
Applies only when the axis
type is category. |
void |
setUnits(TimeUnitMultiples... units)
Datetime axis only.
|
void |
setVisible(Boolean visible)
Whether axis, including axis title, line, ticks and labels, should be
visible.
|
getAxisIndex, getConfiguration, getMax, getMin, setAxisIndex, setConfiguration, setExtremes, setExtremes, setExtremes, setExtremes, setExtremes, setExtremes, setMax, setMax, setMin, setMinpublic Boolean getAllowDecimals()
getAllowDecimals in class AxissetAllowDecimals(Boolean)public void setAllowDecimals(Boolean allowDecimals)
Defaults to: true
setAllowDecimals in class Axispublic Boolean getAlternateGridColor()
getAlternateGridColor in class AxissetAlternateGridColor(Boolean)public void setAlternateGridColor(Boolean alternateGridColor)
setAlternateGridColor in class Axispublic String[] getCategories()
getCategories in class AxissetCategories(String...)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 the
categories array.
Example:
categories: ['Apples', 'Bananas', 'Oranges']Defaults to
null
setCategories in class Axispublic void addCategory(String category)
addCategory in class Axiscategory - to addsetCategories(String...)public void removeCategory(String category)
removeCategory in class Axiscategory - to removesetCategories(String...)public Number getCeiling()
getCeiling in class AxissetCeiling(Number)public void setCeiling(Number ceiling)
setCeiling in class Axispublic String getClassName()
getClassName in class AxissetClassName(String)public void setClassName(String className)
setClassName in class Axispublic Crosshair getCrosshair()
getCrosshair in class AxissetCrosshair(Crosshair)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-thin or
.highcharts-xaxis-category classes.
Defaults to: false
setCrosshair in class Axispublic DateTimeLabelFormats getDateTimeLabelFormats()
getDateTimeLabelFormats in class AxissetDateTimeLabelFormats(DateTimeLabelFormats)public void setDateTimeLabelFormats(DateTimeLabelFormats dateTimeLabelFormats)
day unit can be used on midnight and
hour unit 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'
}
setDateTimeLabelFormats in class Axispublic String getDescription()
getDescription in class AxissetDescription(String)public void setDescription(String description)
Requires Accessibility module
Description of the axis to screen reader users.
Defaults to: undefined
setDescription in class Axispublic Boolean getEndOnTick()
getEndOnTick in class AxissetEndOnTick(Boolean)public void setEndOnTick(Boolean endOnTick)
maxPadding option to control the axis end.
Defaults to: false
setEndOnTick in class Axispublic Number getFloor()
getFloor in class AxissetFloor(Number)public void setFloor(Number floor)
Defaults to: null
public Number getGridZIndex()
getGridZIndex in class AxissetGridZIndex(Number)public void setGridZIndex(Number gridZIndex)
Defaults to: 1
setGridZIndex in class Axispublic String getId()
getId in class AxissetId(String)public void setId(String id)
chart.get().public Labels getLabels()
getLabels in class AxissetLabels(Labels)public void setLabels(Labels labels)
public Number getLinkedTo()
getLinkedTo in class AxissetLinkedTo(Number)public void setLinkedTo(Number linkedTo)
setLinkedTo in class Axispublic Number getMaxPadding()
getMaxPadding in class AxissetMaxPadding(Number)public void setMaxPadding(Number maxPadding)
max option is set or a max extreme is set using
axis.setExtremes(), the maxPadding will be ignored.
Defaults to: 0.01
setMaxPadding in class Axispublic Number getMinPadding()
getMinPadding in class AxissetMinPadding(Number)public void setMinPadding(Number minPadding)
min option is set or a min extreme is set using
axis.setExtremes(), the minPadding will be ignored.
Defaults to: 0.01
setMinPadding in class Axispublic Number getMinRange()
getMinRange in class AxissetMinRange(Number)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,
startOnTick and endOnTick settings also affect
how the extremes of the axis are computed.
setMinRange in class Axispublic Number getMinTickInterval()
getMinTickInterval in class AxissetMinTickInterval(Number)public void setMinTickInterval(Number minTickInterval)
setMinTickInterval in class Axispublic String getMinorTickInterval()
getMinorTickInterval in class AxissetMinorTickInterval(String)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. 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.
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.
setMinorTickInterval in class Axispublic Number getMinorTickLength()
getMinorTickLength in class AxissetMinorTickLength(Number)public void setMinorTickLength(Number minorTickLength)
Defaults to: 2
setMinorTickLength in class Axispublic TickPosition getMinorTickPosition()
getMinorTickPosition in class AxissetMinorTickPosition(TickPosition)public void setMinorTickPosition(TickPosition minorTickPosition)
inside and outside.
Defaults to: outside
setMinorTickPosition in class Axispublic Number getOffset()
getOffset in class AxissetOffset(Number)public void setOffset(Number offset)
Defaults to: 0
public Boolean getOpposite()
getOpposite in class AxissetOpposite(Boolean)public void setOpposite(Boolean opposite)
Defaults to: false
setOpposite in class Axispublic PlotBand[] getPlotBands()
getPlotBands in class AxissetPlotBands(PlotBand...)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-band class in addition to the
className option.
setPlotBands in class Axispublic void addPlotBand(PlotBand plotBand)
addPlotBand in class AxisplotBand - to addsetPlotBands(PlotBand...)public void removePlotBand(PlotBand plotBand)
removePlotBand in class AxisplotBand - to removesetPlotBands(PlotBand...)public PlotLine[] getPlotLines()
getPlotLines in class AxissetPlotLines(PlotLine...)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-line class in addition to the
className option.
setPlotLines in class Axispublic void addPlotLine(PlotLine plotLine)
addPlotLine in class AxisplotLine - to addsetPlotLines(PlotLine...)public void removePlotLine(PlotLine plotLine)
removePlotLine in class AxisplotLine - to removesetPlotLines(PlotLine...)public Boolean getReversed()
getReversed in class AxissetReversed(Boolean)public void setReversed(Boolean reversed)
Defaults to: false
setReversed in class Axispublic Boolean getShowEmpty()
getShowEmpty in class AxissetShowEmpty(Boolean)public void setShowEmpty(Boolean showEmpty)
Defaults to: true
setShowEmpty in class Axispublic Boolean getShowFirstLabel()
getShowFirstLabel in class AxissetShowFirstLabel(Boolean)public void setShowFirstLabel(Boolean showFirstLabel)
Defaults to: true
setShowFirstLabel in class Axispublic Boolean getShowLastLabel()
getShowLastLabel in class AxissetShowLastLabel(Boolean)public void setShowLastLabel(Boolean showLastLabel)
Defaults to: true
setShowLastLabel in class Axispublic Number getSoftMax()
getSoftMax in class AxissetSoftMax(Number)public void setSoftMax(Number softMax)
setSoftMax in class Axispublic Number getSoftMin()
getSoftMin in class AxissetSoftMin(Number)public void setSoftMin(Number softMin)
setSoftMin in class Axispublic Number getStartOfWeek()
getStartOfWeek in class AxissetStartOfWeek(Number)public void setStartOfWeek(Number startOfWeek)
Defaults to: 1
setStartOfWeek in class Axispublic Boolean getStartOnTick()
getStartOnTick in class AxissetStartOnTick(Boolean)public void setStartOnTick(Boolean startOnTick)
minPadding option to control the axis start.
Defaults to: false
setStartOnTick in class Axispublic Number getTickAmount()
getTickAmount in class AxissetTickAmount(Number)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 tickPixelInterval option.
This option only has an effect on linear axes. Datetime, logarithmic or category axes are not affected.
setTickAmount in class Axispublic Number getTickInterval()
getTickInterval in class AxissetTickInterval(Number)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, a null tickInterval will
default to 1, one category. Note that datetime axes are based on
milliseconds, so for example an interval of one day is expressed as
24 * 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
tickInterval setting.
setTickInterval in class Axispublic Number getTickLength()
getTickLength in class AxissetTickLength(Number)public void setTickLength(Number tickLength)
Defaults to: 10
setTickLength in class Axispublic Number getTickPixelInterval()
getTickPixelInterval in class AxissetTickPixelInterval(Number)public void setTickPixelInterval(Number tickPixelInterval)
If tickInterval is null this 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 72 for the Y axis and 100 for the X
axis.
setTickPixelInterval in class Axispublic TickPosition getTickPosition()
getTickPosition in class AxissetTickPosition(TickPosition)public void setTickPosition(TickPosition tickPosition)
inside and outside.
Defaults to: outside
setTickPosition in class Axispublic Number[] getTickPositions()
getTickPositions in class AxissetTickPositions(Number[])public void setTickPositions(Number[] tickPositions)
setTickPositions in class Axispublic TickmarkPlacement getTickmarkPlacement()
getTickmarkPlacement in class AxissetTickmarkPlacement(TickmarkPlacement)public void setTickmarkPlacement(TickmarkPlacement tickmarkPlacement)
on the tick mark is placed in
the center of the category, if between the tick mark is
placed between categories. The default is between if the
tickInterval is 1, else on.
Defaults to: null
setTickmarkPlacement in class Axispublic AxisTitle getTitle()
getTitle in class AxissetTitle(AxisTitle)public void setTitle(AxisTitle title)
public AxisType getType()
getType in class AxissetType(AxisType)public void setType(AxisType type)
linear,
logarithmic, datetime or category.
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
public Boolean getUniqueNames()
getUniqueNames in class AxissetUniqueNames(Boolean)public void setUniqueNames(Boolean uniqueNames)
type is category.
When uniqueNames is 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. When uniqueNames is 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
setUniqueNames in class Axispublic TimeUnitMultiples[] getUnits()
getUnits in class AxissetUnits(TimeUnitMultiples...)public void setUnits(TimeUnitMultiples... units)
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
]]
public void addUnit(TimeUnitMultiples unit)
addUnit in class Axisunit - to addsetUnits(TimeUnitMultiples...)public void removeUnit(TimeUnitMultiples unit)
removeUnit in class Axisunit - to removesetUnits(TimeUnitMultiples...)public Boolean getVisible()
getVisible in class AxissetVisible(Boolean)public void setVisible(Boolean visible)
Defaults to: true
setVisible in class Axispublic void setLinkedTo(ZAxis axis)
Copyright © 2025. All rights reserved.