AnyChart
API Reference
Still have questions?
Contact support
Top

class anychart.core.axisMarkers.CurrentPriceIndicator Improve this Doc

Extends: anychart.core.VisualBase

Stock current price indicator class.

Methods Overview

Specific settings
value()Price indicator value.
valueField()Price indicator value field.
Axes and Scales
axis()Axis settings.
Coloring
fallingStroke()Falling stroke settings.
risingStroke()Rising stroke settings.
stroke()Stroke settings.
Interactivity
enabled()Element state (enabled or disabled).
Markers elements
fallingLabel()Falling label settings.
label()Label settings.
risingLabel()Rising label settings.
Series
series()Target series for a price indicator.
Size and Position
zIndex()Z-index of the element.

Methods Description

axis

Getter for the target axis.

Returns:

anychart.core.axes.Linear - Axis instance.
See listing
var priceIndicator = plot.priceIndicator();
var axis = priceIndicator.axis();
Setter for the target axis.

Params:

NameTypeDescription
indexOrAxisnumber | anychart.core.axes.LinearAxis index or axis instance to set.

Returns:

anychart.core.axisMarkers.CurrentPriceIndicator - Self instance for method chaining.

enabled

Getter for the element state (enabled or disabled).

Returns:

boolean - Element state.
Setter for the element enabled state.

Params:

NameTypeDefaultDescription
enabledboolean
true
Enabled state to set.

Returns:

anychart.core.axisMarkers.CurrentPriceIndicator - Self instance for method chaining.
Example.
if (!element.enabled())
   element.enabled(true);

fallingLabel

Getter for the price indicator falling label.

Returns:

anychart.core.ui.Label - Label instance.
See listing
var priceIndicator = plot.priceIndicator();
var fallingLabel = priceIndicator.fallingLabel();
Setter for the price indicator falling label.

Params:

NameTypeDefaultDescription
indexstring | number
Label index.
settingsnull | boolean | Object
true
Label settings.

Returns:

anychart.core.axisMarkers.CurrentPriceIndicator - Self instance for method chaining.

fallingStroke

Getter for the price indicator falling stroke.

Returns:

anychart.graphics.vector.Stroke - Falling stroke settings.
See listing
var priceIndicator = plot.priceIndicator();
var fallingStroke = priceIndicator.fallingStroke();
Setter for the price indicator falling stroke.

Params:

NameTypeDescription
coloranychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | nullStroke settings.
thicknessnumberLine thickness.
dashpatternstringControls the pattern of dashes and gaps used to stroke paths.
lineJoinstring | anychart.graphics.vector.StrokeLineJoinLine join style.
lineCapstring | anychart.graphics.vector.StrokeLineCapLine cap style.

Returns:

anychart.core.axisMarkers.CurrentPriceIndicator - Self instance for method chaining.
Setter for falling stroke using an object.

Params:

NameTypeDescription
settingsObjectStroke settings from anychart.graphics.vector.Stroke.

Returns:

anychart.core.axisMarkers.CurrentPriceIndicator - Self instance for method chaining.

label

Getter for the price indicator label.

Returns:

anychart.core.ui.LabelsFactory - Labels factory instance.
See listing
var priceIndicator = plot.priceIndicator();
var label = priceIndicator.label();
Setter for the price indicator label.

Params:

NameTypeDefaultDescription
indexstring | number
Label index.
settingsnull | boolean | Object
true
Label settings.

Returns:

anychart.core.axisMarkers.CurrentPriceIndicator - Self instance for method chaining.

risingLabel

Getter for the price indicator rising label.

Returns:

anychart.core.ui.Label - Label instance.
See listing
var priceIndicator = plot.priceIndicator();
var risingLabel = priceIndicator.risingLabel();
Setter for the price indicator rising label.

Params:

NameTypeDefaultDescription
indexstring | number
Label index.
settingsnull | boolean | Object
true
Label settings.

Returns:

anychart.core.axisMarkers.CurrentPriceIndicator - Self instance for method chaining.

risingStroke

Getter for the price indicator rising stroke.

Returns:

anychart.graphics.vector.Stroke - Rising stroke settings.
See listing
var priceIndicator = plot.priceIndicator();
var risingStroke = priceIndicator.risingStroke();
Setter for the price indicator rising stroke.

Params:

NameTypeDescription
coloranychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | nullStroke settings.
thicknessnumberLine thickness.
dashpatternstringControls the pattern of dashes and gaps used to stroke paths.
lineJoinstring | anychart.graphics.vector.StrokeLineJoinLine join style.
lineCapstring | anychart.graphics.vector.StrokeLineCapLine cap style.

Returns:

anychart.core.axisMarkers.CurrentPriceIndicator - Self instance for method chaining.
Setter for rising stroke using an object.

Params:

NameTypeDescription
settingsObjectStroke settings from anychart.graphics.vector.Stroke.

Returns:

anychart.core.axisMarkers.CurrentPriceIndicator - Self instance for method chaining.

series

Getter for the target series.

Returns:

anychart.core.stock.series.Base - Series instance.
See listing
var priceIndicator = plot.priceIndicator();
var series = priceIndicator.series();
Setter for the target series.

Params:

NameTypeDescription
indexOrSeriesnumber | anychart.core.stock.series.BaseIndex or series instance.

Returns:

anychart.core.axisMarkers.CurrentPriceIndicator - Self instance for method chaining.

stroke

Getter for the price indicator stroke.

Returns:

anychart.graphics.vector.Stroke - Stroke settings.
See listing
var priceIndicator = plot.priceIndicator();
var stroke = priceIndicator.stroke();
Setter for the price indicator stroke. Learn more about stroke settings.

Params:

NameTypeDescription
coloranychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | nullStroke settings.
thicknessnumberLine thickness.
dashpatternstringControls the pattern of dashes and gaps used to stroke paths.
lineJoinstring | anychart.graphics.vector.StrokeLineJoinLine join style.
lineCapstring | anychart.graphics.vector.StrokeLineCapLine cap style.

Returns:

anychart.core.axisMarkers.CurrentPriceIndicator - Self instance for method chaining.
Setter for price indicator stroke settings using an object.

Params:

NameTypeDescription
settingsObjectObject with stroke settings from anychart.graphics.vector.Stroke

Returns:

anychart.core.axisMarkers.CurrentPriceIndicator - Self instance for method chaining.

value

Getter for the price indicator value.

Returns:

anychart.enums.PriceIndicatorDataSource | string | number | Date - Price indicator value.
See listing
var priceIndicator = plot.priceIndicator();
var value = priceIndicator.value();
Setter for the stock price indicator.

Params:

NameTypeDefaultDescription
valueanychart.enums.PriceIndicatorDataSource | string | number | Date
'series-start'
Value to set.

Returns:

anychart.core.axisMarkers.CurrentPriceIndicator - Self instance for method chaining.

valueField

Getter for the price indicator value field.

Returns:

string - Price indicator value field.
See listing
var priceIndicator = plot.priceIndicator();
var valueField = priceIndicator.valueField();
Setter for the price indicator value field.
valueField() method use with anychart.core.axisMarkers.CurrentPriceIndicator#value method. This method sets the field to be used as the value for the price indicator

Params:

NameTypeDescription
fieldNamestringField name from data.

Returns:

string - Price indicator value field.

zIndex

Getter for the Z-index of the element.

Returns:

number - Z-index.
Setter for the Z-index of the element.

Params:

NameTypeDefaultDescription
zIndexnumber
0
Value to set.

Returns:

anychart.core.axisMarkers.CurrentPriceIndicator - Self instance for method chaining.