class anychart.core.axisMarkers.Range Improve this Doc
Extends: anychart.core.VisualBase
Range marker.
Methods Overview
Axes and Scales | |
axis() | Axis settings. |
scale() | Scale settings. |
scaleRangeMode() | Scale range mode. |
Coloring | |
fill() | Fill settings. |
Interactivity | |
enabled() | Element state (enabled or disabled). |
Size and Position | |
from() | Starting range marker value. |
isHorizontal() | Whether a range marker has horizontal layout. |
layout() | Layout settings. |
to() | Ending range marker value. |
zIndex() | Z-index of the element. |
Methods Description
axis
Setter for the range marker axis.
Params:
Name | Type | Default | Description |
---|---|---|---|
axis | anychart.core.axes.Linear | null | Axis instance to set. |
Returns:
anychart.core.axisMarkers.Line - Self instance for method chaining.Try it:
enabled
Getter for the element state (enabled or disabled).
Returns:
boolean - Element state.Try it:
Setter for the element enabled state.
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | Enabled state to set. |
Returns:
anychart.core.axisMarkers.Range - Self instance for method chaining. Example.
if (!element.enabled()) element.enabled(true);
Try it:
fill
Getter for the range marker fill.
Returns:
anychart.graphics.vector.Fill - Range marker settings. See listing
var rangeMarkerSettings = chart.rangeMarker(); var fill = rangeMarkerSettings.fill();
Setter for fill settings using an array, an object or a string.
Learn more about coloring.
Params:
Name | Type | Default | Description |
---|---|---|---|
color | anychart.graphics.vector.Fill | Array.<(anychart.graphics.vector.GradientKey|string)> | {color: '#c1c1c1', opacity: 0.4} | Color as an object, an array or a string. |
Returns:
anychart.core.axisMarkers.Range - Self instance for method chaining.Fill color with opacity. Fill as a string or an object.
Detailed description
Note: If color is set as a string (e.g. red .5) it has a priority over opt_opacity, which
means: color set like this rect.fill(red 0.3, 0.7) will have 0.3 opacity.
Params:
Name | Type | Default | Description |
---|---|---|---|
color | string | '#c1c1c1' | Color as a string. |
opacity | number | 0.4 | Color opacity. |
Returns:
anychart.core.axisMarkers.Range - Self instance for method chaining.Try it:
Linear gradient fill.
Learn more about coloring.
Params:
Name | Type | Description |
---|---|---|
keys | Array.<(anychart.graphics.vector.GradientKey|string)> | Gradient keys. |
angle | number | Gradient angle. |
mode | boolean | anychart.graphics.vector.Rect | Object | Gradient mode. |
opacity | number | Gradient opacity. |
Returns:
anychart.core.axisMarkers.Range - Self instance for method chaining.Try it:
Radial gradient fill.
Learn more about coloring.
Params:
Name | Type | Description |
---|---|---|
keys | Array.<(anychart.graphics.vector.GradientKey|string)> | Color-stop gradient keys. |
cx | number | X ratio of center radial gradient. |
cy | number | Y ratio of center radial gradient. |
mode | anychart.graphics.math.Rect | If defined then userSpaceOnUse mode, else objectBoundingBox. |
opacity | number | Opacity of the gradient. |
fx | number | X ratio of focal point. |
fy | number | Y ratio of focal point. |
Returns:
anychart.core.axisMarkers.Range - Self instance for method chaining.Try it:
Image fill.
Learn more about coloring.
Params:
Name | Type | Description |
---|---|---|
imageSettings | anychart.graphics.vector.Fill | Object with settings. |
Returns:
anychart.core.axisMarkers.Range - Self instance for method chaining.Try it:
from
Getter for the starting range marker value.
Returns:
number - The starting range marker value. See listing
var rangeMarkerSettings = chart.rangeMarker(); var startingValue = rangeMarkerSettings.from();
Setter for the starting range marker value.
Params:
Name | Type | Default | Description |
---|---|---|---|
fromValue | number | 0 | 'From' value to set. |
Returns:
anychart.core.axisMarkers.Range - Self instance for method chaining.Try it:
isHorizontal
Whether a range marker has horizontal layout.
Layout is define by anychart.core.axisMarkers.Range#layout method.
Returns:
boolean - Returns true if the range marker's layout is horizontal.Try it:
layout
Getter for the range marker layout.
Returns:
anychart.enums.Layout | string - The range marker layout.Try it:
Setter for the range marker layout.
Params:
Name | Type | Default | Description |
---|---|---|---|
layout | anychart.enums.Layout | string | 'horizontal' | Range marker layout. |
Returns:
anychart.core.axisMarkers.Range - Self instance for method chaining.Try it:
scale
Getter for the range marker scale.
Returns:
anychart.scales.Base - The range marker scale.Setter for the range marker scale.
Params:
Name | Type | Default | Description |
---|---|---|---|
settings | anychart.scales.Base | Object | anychart.enums.ScaleTypes | string | anychart.scales.Linear | Scale settings to set. |
Returns:
anychart.core.axisMarkers.Range - Self instance for method chaining.Try it:
scaleRangeMode
Getter for the scale range mode.
Returns:
string - Scale range mode. See listing
var rangeMarker = chart.rangeMarker(); var scaleRangeMode = rangeMarker.scaleRangeMode();
Setter for the scale range mode.
Whether to consider the range marker value in the scale calculation or not. The 'consider' mode consideres the marker value in the scale.
Whether to consider the range marker value in the scale calculation or not. The 'consider' mode consideres the marker value in the scale.
Params:
Name | Type | Default | Description |
---|---|---|---|
mode | string | anychart.enums.ScaleRangeMode | 'none' | Mode to set. |
Returns:
anychart.core.axisMarkers.Range - Self instance for method chaining.Try it:
to
Getter for the ending range marker value.
Returns:
number - The ending range marker value. See listing
var rangeMarkerSettings = chart.rangeMarker(); var endingValue = rangeMarkerSettings.to();
Setter for the ending range marker value.
Params:
Name | Type | Default | Description |
---|---|---|---|
toValue | number | 0 | 'To' value to set. |
Returns:
anychart.core.axisMarkers.Range - Self instance for method chaining.Try it:
zIndex
Setter for the Z-index of the element.
Detailed description
The bigger the index - the higher the element position is.
Params:
Name | Type | Default | Description |
---|---|---|---|
zIndex | number | 0 | Value to set. |
Returns:
anychart.core.axisMarkers.Range - Self instance for method chaining.Try it: