Represents an axis. Note that an object implementing this interface does not
know anything about it's eventual orientation on screen because the possible
orientation on screen depends on the chart type it is used in.
An axis supports two different formatters, one for
getLabelFormatter() labels (i.e. tick-mark decorations) and one for
the getMarkerFormatter() marker. A formatted value using one of
these formatters can be retrieved through
getFormattedValue(int, Value) and
getFormattedMarkerValue(int, Value).
Can not use overloaded methods with same parameter number due to js specification.
If methods are overloaded they will not be exported to javascript.
Summary
Methods |
|
addSubAxis(axis) |
|
applySpacing() |
|
determineMaximum(values, attribute) |
|
determineMinimum(values, attribute) |
|
determineTickConfiguration(canChangeMin, canChangeMax,numberOfValues) |
|
getAttribute() |
|
getAxisConfiguration() |
|
getAxisScale() |
|
getBaseLineValue() |
|
getCurrentSubTickmarkPosition(base, subMarks,i) |
|
getCurrentTickmarkValue(current) |
|
getDesiredTickmarks() |
|
getFormattedMarkerValue(index, value) |
|
getFormattedValue(index, value) |
|
getLabelFormatter() |
|
getLabelText() |
|
getMarkerFormatter() |
|
getMaximum() |
|
getMinimum() |
|
getRange() |
|
getSpacingEnd() |
|
getSpacingStart() |
|
isArrowSupported() |
|
isCheckForCollisions() |
|
isDesiredTickmarksSet() |
|
isDisplayFirstTick() |
|
isDisplayLastTick() |
|
isInRange(scalar, index) |
|
isInRange(value, index) |
|
isJustZoomed() |
|
isNullDisplayFirstTick() |
|
isNullDisplayLastTick() |
|
isScrollingEnabled() |
|
isSecondary() |
|
isZeroLineSupported() |
|
isZoomingEnabled() |
|
mapValueOnAxis(row, value) |
|
setAttribute(attribute) |
|
setAxisConfiguration(axisConfiguration) |
|
setBaseLineValue(baseLineValue) |
|
setCheckForCollisions(checkForCollisions) |
|
setDesiredTickmarks(desiredTickmarks) |
|
setDesiredTickmarksSet(desiredTickmarksSet) |
|
setDisplayFirstTick(displayFirstTick) |
|
setDisplayLastTick(displayLastTick) |
|
setInternalMaximum(maximum) |
|
setInternalMinimum(minimum) |
|
setJustZoomed(justZoomed) |
|
setLabelFormatter(formatter) |
|
setLabelText(labelText) |
|
setMarkerFormatter(markerFormatter) |
|
setMarkerFormattingPattern(formattingPattern) |
|
setMaximumAsDataType(maximum) |
|
setMaximumAsDate(maximum) |
|
setMaximumAsNumber(maximum) |
|
setMinimumAsDataType(minimum) |
|
setMinimumAsDate(minimum) |
|
setMinimumAsNumber(minimum) |
|
setScrollingEnabled(scrollingEnabled) |
|
setSpacingEnd(spacingEnd) |
|
setSpacingStart(spacingStart) |
|
setTickmarkFormattingPattern(formattingPattern) |
|
setZoomingEnabled(zoomingEnabled) |
Method detail
addSubAxis(axis)
Adds a sub-axis to this ac.Axis.
Parameters
* axis (ac.Axis) the sub-axis to add.
applySpacing()
determineMaximum(values, attribute)
Determines the maximum value for the axis' range from a ac.ValueSet
using the given attribute of a ac.Value.
Parameters
* values (ac.ValueSet) the ac.ValueSet to determine the maximum from.
* attribute (integer) the attribute to determine the maximum from.
determineMinimum(values, attribute)
Determines the minimum value for the axis' range from a ac.ValueSet
using the given attribute of a ac.Value.
Parameters
* values (ac.ValueSet) the ac.ValueSet to determine the minimum from.
* attribute (integer) the attribute to determine the minimum from.
determineTickConfiguration(canChangeMin, canChangeMax,numberOfValues)
Determines the axis' ticks configuration.
Parameters
* canChangeMin (boolean) indicates whether the minimum
value of the axis can be changed to optimize the tick
configuration.
* canChangeMax (boolean) indicates whether the maximum
value of the axis can be changed to optimize the tick
configuration.
* numberOfValues (integer)
getAttribute()
Returns the attribute of this axis.
Returns
* the integer attribute of this axis.
getAxisConfiguration()
Returns the ac.AxisConfiguration for this axis. Note that if the
ac.AxisConfiguration has not been explicitly set and the chart has
not yet been updated, the return value may be null.
Returns
* the ac.AxisConfiguration for this axis.
getAxisScale()
Sets the ac.AxisScale used to display this ac.Axis.
Returns
* the ac.AxisScale used to display this ac.Axis.
getBaseLineValue()
Returns the axis' current base line value. For a clustered bar chart,
the layouting process uses this value to determine in which direction
a bar has to point. Usually, this value is zero (0.0), meaning that
bars with positive values reach into the quadrant spanned by category
axis and positive value axis, while bars with negative values reach
into the quadrant spanned by category axis and negative value axis.
Returns
* the current base line value of the axis (double)
getCurrentSubTickmarkPosition(base, subMarks,i)
Calculates the current position of a sub tickmark.
Parameters
* base (numeric) the base is the with on horizontal axis an the height on
vertical axis
* subMarks (integer) the number of submarks
* i (integer) the current submark
Returns
* current position of a sub tickmark
getCurrentTickmarkValue(current)
Converts the given tickmark value; in linear case it is nothing to
convert
Parameters
* current current tickmark value
Returns
* the same value as given
getDesiredTickmarks()
getFormattedMarkerValue(index, value)
Returns the formatted String representation of a given
ac.Value using the marker formatting set with
setMarkerFormatter(DataTypeFormatter).
Parameters
* index the index of the value in the corresponding ac.ValueSet.
* value value the actual ac.Value to map.
Returns
* the formatted String representation of the value.
getFormattedValue(index, value)
Returns the formatted String representation of a given
ac.Value using the label formatter set with
setLabelFormatter(DataTypeFormatter).
Parameters
* index the index of the value in the corresponding ac.ValueSet.
* value value the actual ac.Value to map.
Returns
* the formatted String representation of the value.
getLabelFormatter()
Returns the ac.DataTypeFormatter for the axis' labels.
Returns
* the ac.DataTypeFormatter for the axis' labels.
getLabelText()
Returns the text to be displayed as a label for this axis.
Returns
* labelText as text
getMarkerFormatter()
Returns the ac.DataTypeFormatter for this axis' marker.
Returns
* the ac.DataTypeFormatter for this axis' marker.
getMaximum()
Returns the maximum ac.DataType displayed on this ac.Axis.
Returns
* the maximum ac.DataType displayed on this ac.Axis.
getMinimum()
Returns the minimum ac.DataType displayed on this ac.Axis.
Returns
* the minimum ac.DataType displayed on this ac.Axis.
getRange()
Returns the numeric range of this axis by subtracting the axis'
maximum ac.DataType#getValue() from the
minimum ac.DataType#getValue().
Returns
* the numeric range of this axis.
getSpacingEnd()
getSpacingStart()
isArrowSupported()
Indicates whether the axis supports an arrow on any side.
Returns
* true if the axis supports an arrow, false otherwise.
isCheckForCollisions()
Indicates whether this axis should check ValuePoints for collisions and disable them, if applicable.
Returns
* boolean value
isDesiredTickmarksSet()
Whether or not desired tickmarks is set
Returns
* true when it is set, false otherwise
isDisplayFirstTick()
isDisplayLastTick()
isInRange(scalar, index)
Indicates whether a given ac.DataType scalar is within the range of the axis.
Parameters
* scalar the value ac.DataType scalar to check.
* index the index of the value, or -1 if not applicable.
Returns
* true if the scalar is within the range, false otherwise.
isInRange(value, index)
Indicates whether a given ac.Value value is within the range of
the axis. This method uses the getAttribute() attribute index
to access the corresponding ac.DataType scalar in the value for
checking.
Parameters
* value the value ac.Value to check.
* index the index of the value, or -1 if not applicable.
Returns
* true if the scalar is within the range, false otherwise.
isJustZoomed()
Indicates whether the axis scale was just reduced due to zooming.
Important to differentiate between scrolling and zooming.
Returns
* boolean value
isNullDisplayFirstTick()
isNullDisplayLastTick()
isScrollingEnabled()
Returns whether scrolling on this axis is enabled.
Returns
* true if scrolling is enabled, false otherwise.
isSecondary()
Indicates whether the axis is a secondary axis or not.
Returns
* true if the axis is secondary, false otherwise.
isZeroLineSupported()
Indicates whether the axis supports displaying a highlighted zero-line.
Returns
* true if the axis supports a highlighted zero-line, false otherwise.
isZoomingEnabled()
Returns whether zooming on this axis is enabled.
Returns
* true if zooming is enabled, false otherwise.
mapValueOnAxis(row, value)
Maps a given ac.Value value from a ac.ValueSet to the axis' range.
Parameters
* row (integer) the index of the value in the corresponding ac.ValueSet.
* value (ac.Value) the ac.Value to map.
setAttribute(attribute)
Sets the attribute of this axis.
Parameters
* attribute (integer) the attribute of this axis.
setAxisConfiguration(axisConfiguration)
Sets the ac.AxisConfiguration for this axis.
Parameters
* axisConfiguration (ac.AxisConfiguration) the ac.AxisConfiguration to use.
setBaseLineValue(baseLineValue)
Sets the axis' base line value. For a clustered bar chart, the
layouting process uses this value to determine in which direction
a bar has to point. Usually, this value is zero (0.0), meaning that
bars with positive values reach into the quadrant spanned by category
axis and positive value axis, while bars with negative values reach
into the quadrant spanned by category axis and negative value axis.
Parameters
* baseLineValue (double)
setCheckForCollisions(checkForCollisions)
Sets whether this axis should check ValuePoints for collisions and disable them, if applicable.
Parameters
* checkForCollision (boolean)
setDesiredTickmarks(desiredTickmarks)
Parameters
* desiredTickmarks (integer)
setDesiredTickmarksSet(desiredTickmarksSet)
Note that desired tickmarks are set
Parameters
* desiredTickmarksSet (bool)
setDisplayFirstTick(displayFirstTick)
Parameters
* displayFirstTick (boolean)
setDisplayLastTick(displayLastTick)
Parameters
* displayLastTick (boolean)
setInternalMaximum(maximum)
Sets the maximum ac.DataType displayed on this ac.Axis.
Not intended for the user!
Parameters
* maximum the maximum ac.DataType displayed on this ac.Axis.
setInternalMinimum(minimum)
Sets the minimum ac.DataType displayed on this ac.Axis.
Not intended for the user!
Parameters
* minimum the minimum ac.DataType displayed on this ac.Axis.
setJustZoomed(justZoomed)
Sets whether the axis scale was just reduced due to zooming.
Important to differentiate between scrolling and zooming.
Parameters
* justZoomed (boolean)
setLabelFormatter(formatter)
Sets the ac.DataTypeFormatter for the axis' labels.
Parameters
* formatter (ac.DataTypeFormatter) the ac.DataTypeFormatter to use.
setLabelText(labelText)
Sets the text to be displayed as a label for this axis.
Parameters
* labelText (text)
setMarkerFormatter(markerFormatter)
Sets the ac.DataTypeFormatter for this axis' marker.
Parameters
* markerFormatter (ac.DataTypeFormatter) the ac.DataTypeFormatter to use.
setMarkerFormattingPattern(formattingPattern)
Sets the ac.DataTypeFormatter for this axis' marker.
Parameters
* formattingPattern (text) the pattern to use.
setMaximumAsDataType(maximum)
Sets the maximum ac.DataType displayed on this ac.Axis.
Parameters
* maximum the maximum ac.DataType displayed on this ac.Axis.
setMaximumAsDate(maximum)
Sets the maximum ac.DataType} displayed on this ac.Axis.
Parameters
* maximum the maximum Date displayed on this ac.Axis.
setMaximumAsNumber(maximum)
Sets the maximum ac.DataType displayed on this ac.Axis.
Parameters
* maximum the maximum Number displayed on this ac.Axis.
setMinimumAsDataType(minimum)
Sets the minimum ac.DataType displayed on this ac.Axis.
Parameters
* minimum the minimum ac.DataType displayed on this ac.Axis.
setMinimumAsDate(minimum)
Sets the minimum ac.DataType displayed on this ac.Axis.
Parameters
* minimum the minimum Date displayed on this ac.Axis.
setMinimumAsNumber(minimum)
Sets the minimum ac.DataType displayed on this ac.Axis.
Parameters
* minimum the minimum Number displayed on this ac.Axis.
setScrollingEnabled(scrollingEnabled)
Sets whether scrolling on this axis shall be enabled. If
true, a scrollbar is placed next to the axis.
Parameters
* scrollingEnabled (boolean) true if scrolling shall be enabled, false otherwise.
setSpacingEnd(spacingEnd)
Parameters
* spacingEnd (boolean)
setSpacingStart(spacingStart)
Parameters
* spacingStart (boolean)
setTickmarkFormattingPattern(formattingPattern)
Sets the ac.DataTypeFormatter for the axis' labels according to the specified formatting pattern.
Parameters
* formattingPattern (text) the pattern to use.
setZoomingEnabled(zoomingEnabled)
Sets whether zooming on this axis shall be enabled. If
true, the user can drag an area to update the current axis' limits.
Parameters
* zoomingEnabled (boolean) true if zooming shall be enabled, false otherwise.