class anychart.standalones.axisMarkers.Range Improve this Doc
Extends: anychart.core.axisMarkers.Range
The Range class contains methods for configuring standalones range markers.
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. |
parentBounds() | Parent bounds for the range marker. |
to() | Ending range marker value. |
zIndex() | Z-index of the element. |
Miscellaneous | |
container() | Container for the range marker. |
draw() | Drawing of the range marker. |
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:
container
Getter for the range marker container.
Returns:
anychart.graphics.vector.Layer | anychart.graphics.vector.Stage - The range marker container.Setter for the range marker container.
Params:
Name | Type | Description |
---|---|---|
element | anychart.graphics.vector.Layer | anychart.graphics.vector.Stage | string | Element | The value to set. |
Returns:
anychart.standalones.axisMarkers.Range - Self instance for method chaining.Try it:
draw
Drawing of the range marker.
Returns:
anychart.standalones.axisMarkers.Range - 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.standalones.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.standalones.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.standalones.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.standalones.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.standalones.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.standalones.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.standalones.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.standalones.axisMarkers.Range - Self instance for method chaining.Try it:
parentBounds
Getter for bounds.
Returns:
anychart.math.Rect - The range marker bounds.Setter for bounds using single value.
Params:
Name | Type | Description |
---|---|---|
bounds | anychart.math.Rect | Object | null | Bounds to set |
Returns:
anychart.standalones.axisMarkers.Range - Self instance for method chaining.Try it:
Setter for bounds using several values.
Params:
Name | Type | Description |
---|---|---|
left | number | Left space |
top | number | Top space |
width | number | Width line marker |
height | number | Height line marker |
Returns:
anychart.standalones.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.standalones.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.standalones.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.standalones.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.standalones.axisMarkers.Range - Self instance for method chaining.Try it: