Top
You are looking at an outdated 7.7.0 version of this document. Switch to the 8.0.1 version to see the up to date information.

class anychart.core.stock.series.Base Improve this Doc

Extends: anychart.core.VisualBaseWithBounds

Base class for all stock series.

Methods Overview

Specific settings
getIndex()Returns series index.
legendItem()Legend item settings.
Data
data()Data settings.
name()Series name settings.
Point Elements
tooltip()Tooltip settings.
Scales
yScale()Y-scale settings.

Methods Description

data

Gets data for the series.

Returns:

anychart.data.TableMapping anychart.data.Table Array.<Array.<*>> string - Returns current mapping.
Sets data for the series.

Params:

Name Type Description
value anychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | string Data for the series.
mappingSettings Object.<({column: number, type: anychart.enums.AggregationType, weights: number}|number)> Mapping settings. 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.series.Base - Self instance for method chaining.

Try it:

getIndex

Returns series index.

Returns:

number - The current series index.

Try it:

legendItem

Gets the current legend item setting for series.

Returns:

anychart.core.utils.LegendItemSettings - Legend item settings.

Try it:

Sets the legend item setting for series.

Params:

Name Type Description
value Object Legend item settings object.

Returns:

anychart.core.stock.series.Base - Self instance for method chaining.

Try it:

name

Gets the current series name.

Returns:

string - Series name.

Try it:

Sets the series name.

Params:

Name Type Description
value string

Returns:

anychart.core.stock.series.Base - Self instance for method chaining.

Try it:

tooltip

Getter for the current tooltip.

Returns:

anychart.core.ui.SeriesTooltip - Tooltip instance.

Try it:

Setter for the tooltip.

Params:

Name Type Default Description
value Object | boolean | null
true
Tooltip settings.

Returns:

anychart.core.stock.series.Base - Self instance for method chaining.

yScale

Getter for the current Y-scale.

Returns:

anychart.scales.ScatterBase - Series Y-scale.
See listing
var myPlot = chart.plot();
var plotSeries = myPlot.line(data);
plotSeries.yScale();
Setter for the Y-scale.

Params:

Name Type Description
value anychart.scales.ScatterBase Value to set.

Returns:

anychart.core.stock.series.Base - Self instance for method chaining.

Try it: