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, setMin
public Boolean getAllowDecimals()
getAllowDecimals
in class Axis
setAllowDecimals(Boolean)
public void setAllowDecimals(Boolean allowDecimals)
Defaults to: true
setAllowDecimals
in class Axis
public Boolean getAlternateGridColor()
getAlternateGridColor
in class Axis
setAlternateGridColor(Boolean)
public void setAlternateGridColor(Boolean alternateGridColor)
setAlternateGridColor
in class Axis
public String[] getCategories()
getCategories
in class Axis
setCategories(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 Axis
public void addCategory(String category)
addCategory
in class Axis
category
- to addsetCategories(String...)
public void removeCategory(String category)
removeCategory
in class Axis
category
- to removesetCategories(String...)
public Number getCeiling()
getCeiling
in class Axis
setCeiling(Number)
public void setCeiling(Number ceiling)
setCeiling
in class Axis
public String getClassName()
getClassName
in class Axis
setClassName(String)
public void setClassName(String className)
setClassName
in class Axis
public Crosshair getCrosshair()
getCrosshair
in class Axis
setCrosshair(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 Axis
public DateTimeLabelFormats getDateTimeLabelFormats()
getDateTimeLabelFormats
in class Axis
setDateTimeLabelFormats(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 Axis
public String getDescription()
getDescription
in class Axis
setDescription(String)
public void setDescription(String description)
Requires Accessibility module
Description of the axis to screen reader users.
Defaults to: undefined
setDescription
in class Axis
public Boolean getEndOnTick()
getEndOnTick
in class Axis
setEndOnTick(Boolean)
public void setEndOnTick(Boolean endOnTick)
maxPadding
option to control the axis end.
Defaults to: false
setEndOnTick
in class Axis
public Number getFloor()
getFloor
in class Axis
setFloor(Number)
public void setFloor(Number floor)
Defaults to: null
public Number getGridZIndex()
getGridZIndex
in class Axis
setGridZIndex(Number)
public void setGridZIndex(Number gridZIndex)
Defaults to: 1
setGridZIndex
in class Axis
public String getId()
getId
in class Axis
setId(String)
public void setId(String id)
chart.get()
.public Labels getLabels()
getLabels
in class Axis
setLabels(Labels)
public void setLabels(Labels labels)
public Number getLinkedTo()
getLinkedTo
in class Axis
setLinkedTo(Number)
public void setLinkedTo(Number linkedTo)
setLinkedTo
in class Axis
public Number getMaxPadding()
getMaxPadding
in class Axis
setMaxPadding(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 Axis
public Number getMinPadding()
getMinPadding
in class Axis
setMinPadding(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 Axis
public Number getMinRange()
getMinRange
in class Axis
setMinRange(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 Axis
public Number getMinTickInterval()
getMinTickInterval
in class Axis
setMinTickInterval(Number)
public void setMinTickInterval(Number minTickInterval)
setMinTickInterval
in class Axis
public String getMinorTickInterval()
getMinorTickInterval
in class Axis
setMinorTickInterval(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 Axis
public Number getMinorTickLength()
getMinorTickLength
in class Axis
setMinorTickLength(Number)
public void setMinorTickLength(Number minorTickLength)
Defaults to: 2
setMinorTickLength
in class Axis
public TickPosition getMinorTickPosition()
getMinorTickPosition
in class Axis
setMinorTickPosition(TickPosition)
public void setMinorTickPosition(TickPosition minorTickPosition)
inside
and outside
.
Defaults to: outside
setMinorTickPosition
in class Axis
public Number getOffset()
getOffset
in class Axis
setOffset(Number)
public void setOffset(Number offset)
Defaults to: 0
public Boolean getOpposite()
getOpposite
in class Axis
setOpposite(Boolean)
public void setOpposite(Boolean opposite)
Defaults to: false
setOpposite
in class Axis
public PlotBand[] getPlotBands()
getPlotBands
in class Axis
setPlotBands(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 Axis
public void addPlotBand(PlotBand plotBand)
addPlotBand
in class Axis
plotBand
- to addsetPlotBands(PlotBand...)
public void removePlotBand(PlotBand plotBand)
removePlotBand
in class Axis
plotBand
- to removesetPlotBands(PlotBand...)
public PlotLine[] getPlotLines()
getPlotLines
in class Axis
setPlotLines(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 Axis
public void addPlotLine(PlotLine plotLine)
addPlotLine
in class Axis
plotLine
- to addsetPlotLines(PlotLine...)
public void removePlotLine(PlotLine plotLine)
removePlotLine
in class Axis
plotLine
- to removesetPlotLines(PlotLine...)
public Boolean getReversed()
getReversed
in class Axis
setReversed(Boolean)
public void setReversed(Boolean reversed)
Defaults to: false
setReversed
in class Axis
public Boolean getShowEmpty()
getShowEmpty
in class Axis
setShowEmpty(Boolean)
public void setShowEmpty(Boolean showEmpty)
Defaults to: true
setShowEmpty
in class Axis
public Boolean getShowFirstLabel()
getShowFirstLabel
in class Axis
setShowFirstLabel(Boolean)
public void setShowFirstLabel(Boolean showFirstLabel)
Defaults to: true
setShowFirstLabel
in class Axis
public Boolean getShowLastLabel()
getShowLastLabel
in class Axis
setShowLastLabel(Boolean)
public void setShowLastLabel(Boolean showLastLabel)
Defaults to: true
setShowLastLabel
in class Axis
public Number getSoftMax()
getSoftMax
in class Axis
setSoftMax(Number)
public void setSoftMax(Number softMax)
setSoftMax
in class Axis
public Number getSoftMin()
getSoftMin
in class Axis
setSoftMin(Number)
public void setSoftMin(Number softMin)
setSoftMin
in class Axis
public Number getStartOfWeek()
getStartOfWeek
in class Axis
setStartOfWeek(Number)
public void setStartOfWeek(Number startOfWeek)
Defaults to: 1
setStartOfWeek
in class Axis
public Boolean getStartOnTick()
getStartOnTick
in class Axis
setStartOnTick(Boolean)
public void setStartOnTick(Boolean startOnTick)
minPadding
option to control the axis start.
Defaults to: false
setStartOnTick
in class Axis
public Number getTickAmount()
getTickAmount
in class Axis
setTickAmount(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 Axis
public Number getTickInterval()
getTickInterval
in class Axis
setTickInterval(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 Axis
public Number getTickLength()
getTickLength
in class Axis
setTickLength(Number)
public void setTickLength(Number tickLength)
Defaults to: 10
setTickLength
in class Axis
public Number getTickPixelInterval()
getTickPixelInterval
in class Axis
setTickPixelInterval(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 Axis
public TickPosition getTickPosition()
getTickPosition
in class Axis
setTickPosition(TickPosition)
public void setTickPosition(TickPosition tickPosition)
inside
and outside
.
Defaults to: outside
setTickPosition
in class Axis
public Number[] getTickPositions()
getTickPositions
in class Axis
setTickPositions(Number[])
public void setTickPositions(Number[] tickPositions)
setTickPositions
in class Axis
public TickmarkPlacement getTickmarkPlacement()
getTickmarkPlacement
in class Axis
setTickmarkPlacement(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 Axis
public AxisTitle getTitle()
getTitle
in class Axis
setTitle(AxisTitle)
public void setTitle(AxisTitle title)
public AxisType getType()
getType
in class Axis
setType(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 Axis
setUniqueNames(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 Axis
public TimeUnitMultiples[] getUnits()
getUnits
in class Axis
setUnits(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 Axis
unit
- to addsetUnits(TimeUnitMultiples...)
public void removeUnit(TimeUnitMultiples unit)
removeUnit
in class Axis
unit
- to removesetUnits(TimeUnitMultiples...)
public Boolean getVisible()
getVisible
in class Axis
setVisible(Boolean)
public void setVisible(Boolean visible)
Defaults to: true
setVisible
in class Axis
public void setLinkedTo(ZAxis axis)
Copyright © 2023. All rights reserved.