AnyChart
API Reference
Still have questions?
Contact support
Top
You are looking at an outdated 7.7.0 version of this document. Switch to the 8.1.0 version to see the up to date information.

class anychart.core.stock.Scroller Improve this Doc

Extends: anychart.core.ui.Scroller

Stock scroller class. Adds series drawing to UI Scroller.

Methods Overview

Axes and Scales
xAxis()X-axis settings.
yScale()Y-scale settings.
Series
column()Addition of the column series.
getSeries()Gets series by index.
line()Addition of the line series.
ohlc()Addition of the line series.

Methods Description

column

Creates and returns a new column series.

Params:

Name Type Description
data anychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | string Value to set.
mappingSettings Object.<({column: number, type: anychart.enums.AggregationType, weights: number}|number)> An object where keys are field names and values are objects with fields: - 'column': number - Column index, that the field should get values from; - 'type': anychart.enums.AggregationType - How to group values for the field. Defaults to 'close'. - 'weights': number - Column to get weights from for 'weightedAverage' grouping type. Note: If type set to 'weightedAverage', but opt_weightsColumn is not passed - uses 'average' grouping instead. or numbers - just the column index to get values from. In this case the grouping type will be set to 'close'.
csvSettings Object CSV parser settings if the string is passed.

Returns:

anychart.core.stock.scrollerSeries.Base - An instance of class for method chaining.

Try it:

getSeries

Gets series by index.

Params:

Name Type Description
index number Series index.

Returns:

anychart.core.stock.scrollerSeries.Base - An instance of class for method chaining.

Try it:

line

Creates and returns a new line series.

Params:

Name Type Description
data anychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | string Value to set.
mappingSettings Object.<({column: number, type: anychart.enums.AggregationType, weights: number}|number)> An object where keys are field names and values are objects with fields: - 'column': number - Column index, that the field should get values from; - 'type': anychart.enums.AggregationType - How to group values for the field. Defaults to 'close'. - 'weights': number - Column to get weights from for 'weightedAverage' grouping type. Note: If type set to 'weightedAverage', but opt_weightsColumn is not passed - uses 'average' grouping instead. or numbers - just the column index to get values from. In this case the grouping type will be set to 'close'.
csvSettings Object CSV parser settings if the string is passed.

Returns:

anychart.core.stock.scrollerSeries.Base - An instance of class for method chaining.

Try it:

ohlc

Creates and returns a new ohlc series.

Params:

Name Type Description
data anychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | string Value to set.
mappingSettings Object.<({column: number, type: anychart.enums.AggregationType, weights: number}|number)> An object where keys are field names and values are objects with fields: - 'column': number - Column index, that the field should get values from; - 'type': anychart.enums.AggregationType - How to group values for the field. Defaults to 'close'. - 'weights': number - Column to get weights from for 'weightedAverage' grouping type. Note: If type set to 'weightedAverage', but opt_weightsColumn is not passed - uses 'average' grouping instead. or numbers - just the column index to get values from. In this case the grouping type will be set to 'close'.
csvSettings Object CSV parser settings if the string is passed.

Returns:

anychart.core.stock.scrollerSeries.Base - An instance of class for method chaining.

Try it:

xAxis

Getter for the current scroller X-axis.

Returns:

anychart.core.axes.StockDateTime - Axis instance.

Try it:

Setter for the scroller X-axis.

Params:

Name Type Description
value Object | boolean | null Chart axis settings to set.

Returns:

anychart.core.stock.Scroller - Self instance for method chaining.

yScale

Getter for the current scroller Y-scale.

Returns:

anychart.scales.ScatterBase - Default chart scale value.
See listing
var myScroller = chart.scroller();
myScroller.yScale();
Setter for the scroller Y-scale.

Params:

Name Type Description
value anychart.enums.ScatterScaleTypes | anychart.scales.ScatterBase Y-scale to set.

Returns:

anychart.core.stock.Scroller - Self instance for method chaining.

Try it: