class anychart.core.stock.series.Stick Improve this Doc
Extends: anychart.core.stock.series.DiscreteBase
Stick Series Class.
Learn more about Stick series
Methods Overview
Specific settings | |
getIndex() | Gets series index. |
labels() | Labels settings. |
legendItem() | Legend item settings. |
maxPointWidth() | Maximum point width settings. |
minPointLength() | Minimum point length settings. |
pointWidth() | Point width settings. |
Coloring | |
colorScale() | Color scale settings. |
stroke() | Stroke settings. |
Data | |
data() | Data settings. |
name() | Series name settings. |
Interactivity | |
enabled() | Element state (enabled or disabled). |
hovered() | Hovered state settings. |
normal() | Normal state settings. |
Point Elements | |
markers() | Markers settings. |
maxLabels() | Maximum labels settings. |
minLabels() | Minimum labels settings. |
tooltip() | Tooltip settings. |
Scales | |
yScale() | Y-scale settings. |
Series | |
allowPointSettings() | Allows to set point settings from data. |
rendering() | Rendering settings |
seriesType() | Switch the series type |
Size and Position | |
bottom() | Bottom bound settings. |
bounds() | Bounds settings. |
getPixelBounds() | Returns pixel bounds. |
height() | Height settings. |
left() | Left bound settings. |
maxHeight() | Maximum height. |
maxWidth() | Maximum width. |
minHeight() | Minimum height. |
minWidth() | Minimum width. |
right() | Right bound settings. |
top() | Top bound settings. |
width() | Width settings. |
zIndex() | Z-index of the element. |
Methods Description
allowPointSettings
Returns:
boolean - Returns allowPointSettings flag.var plot = chart.plot(); var series = plot.column(data); var allowPointSettings = series.allowPointSettings();
The following series support allowPointSettings flag:
- anychart.core.stock.series.Candlestick
- anychart.core.stock.series.Column
- anychart.core.stock.series.Marker
- anychart.core.stock.series.OHLC
- anychart.core.stock.series.RangeColumn
Note: Other series cannot be affected by the allowPointSettings flag.
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | false | Allows to set individual point settings. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.bottom
Returns:
number | string | undefined - Element's bottom bound setting.Params:
Name | Type | Default | Description |
---|---|---|---|
bottom | number | string | null | null | Bottom bound settings for the element. |
Returns:
anychart.core.stock.series.Stick - Returns self for method chaining.Try it:
bounds
Returns:
anychart.core.utils.Bounds - Bounds of the element.Params:
Name | Type | Description |
---|---|---|
bounds | anychart.utils.RectObj | anychart.math.Rect | anychart.core.utils.Bounds | Bounds of element. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.Try it:
Params:
Name | Type | Default | Description |
---|---|---|---|
x | number | string | null | X-coordinate. |
y | number | string | null | Y-coordinate. |
width | number | string | null | Width. |
height | number | string | null | Height. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.Try it:
colorScale
var series = plot.line(mapping); var colorScale = series.colorScale();
Params:
Name | Type | Description |
---|---|---|
settings | anychart.scales.LinearColor | anychart.scales.OrdinalColor | Object | anychart.enums.ScaleTypes | string | Color scale to set. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.Try it:
data
Returns:
anychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | string - Returns mapping.Params:
Name | Type | Description |
---|---|---|
data | anychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | string | Data for the series. |
mappingSettings | Object.<string, ({column: number, type: (anychart.enums.AggregationType|string), 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|string - 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.Stick - Self instance for method chaining.Try it:
enabled
Returns:
boolean - Element state.Try it:
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | Enabled state to set. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.if (!element.enabled()) element.enabled(true);
Try it:
getIndex
getPixelBounds
Returns:
anychart.math.Rect - Pixel bounds of the element.height
Returns:
number | string | undefined - Element's height setting.Params:
Name | Type | Default | Description |
---|---|---|---|
height | number | string | null | null | Height settings for the element. |
Returns:
anychart.core.stock.series.Stick - Returns self for method chaining.Try it:
hovered
Returns:
anychart.core.StateSettings - Hovered state settingsTry it:
Params:
Name | Type | Description |
---|---|---|
settings | Object | State settings to set. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.Try it:
labels
- null/boolean - disable or enable series labels.
- object - sets series labels settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
settings | Object | boolean | null | true | Series labels settings. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.left
Returns:
number | string | undefined - Element's left bound setting.Params:
Name | Type | Default | Description |
---|---|---|---|
left | number | string | null | null | Left bound setting for the element. |
Returns:
anychart.core.stock.series.Stick - Returns self for method chaining.Try it:
legendItem
Returns:
anychart.core.utils.LegendItemSettings - Legend item settings.Try it:
Params:
Name | Type | Description |
---|---|---|
settings | Object | Legend item settings object. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.Try it:
markers
- null/boolean - disable or enable chart markers.
- object - sets chart markers settings.
- string - sets chart markers type.
Params:
Name | Type | Default | Description |
---|---|---|---|
settings | Object | boolean | null | string | false | Data markers settings. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.maxHeight
Returns:
number | string | null - Element's maximum height.Params:
Name | Type | Default | Description |
---|---|---|---|
height | number | string | null | null | Maximum height to set. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.Try it:
maxLabels
- null/boolean - disable or enable maximum labels.
- object - sets maximum labels settings.
Params:
Name | Type | Description |
---|---|---|
settings | Object | boolean | null | Maximum labels settings. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.maxPointWidth
Returns:
string | number - The maximum point width pixel value.var maxPointWidth = plot.maxPointWidth();
Params:
Name | Type | Description |
---|---|---|
width | number | string | Point width pixel value. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.Try it:
maxWidth
Returns:
number | string | null - Element's maximum width.Params:
Name | Type | Default | Description |
---|---|---|---|
width | number | string | null | null | Maximum width to set. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.Try it:
minHeight
Returns:
number | string | null - Element's minimum height.Params:
Name | Type | Default | Description |
---|---|---|---|
height | number | string | null | null | Minimum height to set. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.Try it:
minLabels
- null/boolean - disable or enable minimum labels.
- object - sets minimum labels settings.
Params:
Name | Type | Description |
---|---|---|
settings | Object | boolean | null | Minimum labels settings. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.minPointLength
Returns:
string | number - The minimum point length pixel value.var minPointLength = plot.minPointLength();
Params:
Name | Type | Description |
---|---|---|
length | number | string | Minimum point length pixel value. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.Try it:
minWidth
Returns:
number | string | null - Element's minimum width.Params:
Name | Type | Default | Description |
---|---|---|---|
width | number | string | null | null | Minimum width to set. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.Try it:
name
Params:
Name | Type | Description |
---|---|---|
name | string | Series name. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.Try it:
normal
Returns:
anychart.core.StateSettings - Normal state settings.Try it:
Params:
Name | Type | Description |
---|---|---|
settings | Object | State settings to set. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.Try it:
pointWidth
Returns:
string | number - Point width pixel value.Try it:
Params:
Name | Type | Default | Description |
---|---|---|---|
width | number | string | null | '75%' | Point width pixel value. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.Try it:
rendering
Returns:
anychart.core.series.RenderingSettings - Rendering settings.Try it:
Params:
Name | Type | Description |
---|---|---|
settings | Object | function | Rendering settings to set. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.Try it:
right
Returns:
number | string | undefined - Element's right bound setting.Params:
Name | Type | Default | Description |
---|---|---|---|
right | number | string | null | null | Right bound setting for the element. |
Returns:
anychart.core.stock.series.Stick - Returns self for method chaining.Try it:
seriesType
Params:
Name | Type | Description |
---|---|---|
type | string | Series type. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.Try it:
stroke
Returns:
anychart.graphics.vector.Stroke - Stroke settings.Try it:
Params:
Name | Type | Description |
---|---|---|
color | anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | null | Stroke settings. |
thickness | number | Line thickness. |
dashpattern | string | Controls the pattern of dashes and gaps used to stroke paths. |
lineJoin | string | anychart.graphics.vector.StrokeLineJoin | Line join style. |
lineCap | string | anychart.graphics.vector.StrokeLineCap | Line cap style. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.Try it:
Params:
Name | Type | Description |
---|---|---|
settings | Object | Stroke settings from anychart.graphics.vector.Stroke. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.Try it:
tooltip
- null/boolean - disable or enable series tooltip.
- object - sets series tooltip settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
settings | Object | boolean | null | true | Tooltip settings. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.top
Returns:
number | string | undefined - Element's top bound setting.Params:
Name | Type | Default | Description |
---|---|---|---|
top | number | string | null | null | Top bound setting for the element. |
Returns:
anychart.core.stock.series.Stick - Returns self for method chaining.Try it:
width
Returns:
number | string | undefined - Element's width setting.Params:
Name | Type | Default | Description |
---|---|---|---|
width | number | string | null | null | Width settings for the element. |
Returns:
anychart.core.stock.series.Stick - Returns self for method chaining.Try it:
yScale
Returns:
anychart.scales.ScatterBase - Series Y-scale.var plot = chart.plot(); var plotSeries = plot.line(data); var yScale = plotSeries.yScale();
Params:
Name | Type | Default | Description |
---|---|---|---|
settings | anychart.scales.ScatterBase | Object | anychart.enums.ScaleTypes | string | anychart.scales.Linear | Scale settings to set. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.Try it:
zIndex
Params:
Name | Type | Default | Description |
---|---|---|---|
zIndex | number | 0 | Value to set. |
Returns:
anychart.core.stock.series.Stick - Self instance for method chaining.Try it: