class anychart.core.stock.scrollerSeries.StepLine Improve this Doc
Extends: anychart.core.stock.scrollerSeries.Base
StepLine Series Class.
Learn more about StepLine series
Methods Overview
| Specific settings | |
| labels() | Labels settings. |
| Coloring | |
| colorScale() | Color scale settings. |
| stroke() | Stroke settings. |
| Data | |
| data() | Data settings. |
| Interactivity | |
| enabled() | Element state (enabled or disabled). |
| normal() | Normal state settings. |
| selected() | Hovered state settings. |
| Point Elements | |
| maxLabels() | Maximum labels settings. |
| minLabels() | Minimum labels 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. |
| stepDirection() | Step direction settings. |
| top() | Top bound settings. |
| width() | Width settings. |
| zIndex() | Z-index of the element. |
Methods Description
allowPointSettings
Returns:
boolean - Returns allowPointSettings flag.var scroller = chart.scroller(); var series = scroller.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.scrollerSeries.StepLine - 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.scrollerSeries.StepLine - 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.scrollerSeries.StepLine - 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.scrollerSeries.StepLine - Self instance for method chaining.Try it:
colorScale
var series = scroller.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.scrollerSeries.StepLine - Self instance for method chaining.Try it:
data
Returns:
anychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | string - Returns mapping.Params:
| Name | Type | Description |
|---|---|---|
| value | anychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | string | Data for the scroller 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.scrollerSeries.StepLine - 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.scrollerSeries.StepLine - Self instance for method chaining.if (!element.enabled()) element.enabled(true);
Try it:
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.scrollerSeries.StepLine - Returns self for method chaining.Try it:
labels
Returns:
anychart.core.ui.LabelsFactory - Axis labels instance.Params:
| Name | Type | Description |
|---|---|---|
| settings | Object | boolean | null | Axis labels. |
Returns:
anychart.core.stock.scrollerSeries.StepLine - 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.scrollerSeries.StepLine - Returns self for method chaining.Try it:
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.scrollerSeries.StepLine - Self instance for method chaining.Try it:
maxLabels
Returns:
anychart.core.ui.LabelsFactory - Labels instance.Params:
| Name | Type | Description |
|---|---|---|
| settings | Object | boolean | null | Maximum labels settings. |
Returns:
anychart.core.stock.series.Base | anychart.core.ui.LabelsFactory - Self instance for method chaining.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.scrollerSeries.StepLine - 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.scrollerSeries.StepLine - Self instance for method chaining.Try it:
minLabels
Returns:
anychart.core.ui.LabelsFactory - Labels instance.Params:
| Name | Type | Description |
|---|---|---|
| settings | Object | boolean | null | Minimum labels settings. |
Returns:
anychart.core.stock.scrollerSeries.StepLine - Self instance for method chaining.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.scrollerSeries.StepLine - 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.scrollerSeries.StepLine - 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.scrollerSeries.StepLine - 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.scrollerSeries.StepLine - Returns self for method chaining.Try it:
selected
Returns:
anychart.core.StateSettings - Selected state settingsTry it:
Params:
| Name | Type | Description |
|---|---|---|
| settings | Object | State settings to set. |
Returns:
anychart.core.stock.scrollerSeries.StepLine - Self instance for method chaining.Try it:
seriesType
Params:
| Name | Type | Description |
|---|---|---|
| type | string | Series type. |
Returns:
anychart.core.stock.scrollerSeries.StepLine - Self instance for method chaining.Try it:
stepDirection
Returns:
anychart.enums.StepDirection | string - The step direction.var direction = series.stepDirection();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| direction | anychart.enums.StepDirection | string | 'center' | Value to set. |
Returns:
anychart.core.stock.scrollerSeries.StepLine - Self instance for method chaining.Try it:
stroke
Returns:
anychart.graphics.vector.Stroke - Stroke settings.Try it:
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| strokeFunction | function():anychart.graphics.vector.Stroke|anychart.graphics.vector.ColoredFill | function() {
return anychart.color.darken(this.sourceColor);
} | Function that looks like: function(){
// Context:
// this.x - X value. Type is "date-time"
// this.value - value. Type is number
// this.index - point index (iterator.getIndex();). Type is number
// this.sourceColor - source color of the point.
// this.iterator - series point iterator. Type is instance of anychart.data.TableIterator
// this.plot - link to the plot. Type is instance of anychart.core.stock.Plot
// this.chart - link to the chart. Type is instance of anychart.charts.Stock
// this.name - series name. Type is string
Additional fields if colorScale () is set:
// this.scaledColor - color from this.colorScale for this point of the series. Type is string
// this.colorScale - series color scale. Type is instance of anychart.scales.LinearColor or anychart.scales.OrdinalColor
// Methods from anychart.format.Context are used for an access to series.
return strokeValue; // Type is anychart.graphics.vector.Stroke or anychart.graphics.vector.ColoredFill
} |
Returns:
anychart.core.stock.scrollerSeries.StepLine - Self instance for method chaining.Try it:
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| color | anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | null | Stroke settings. | |
| thickness | number | 1 | 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.scrollerSeries.StepLine - Self instance for method chaining.Try it:
Params:
| Name | Type | Description |
|---|---|---|
| settings | Object | Stroke settings from anychart.graphics.vector.Stroke. |
Returns:
anychart.core.stock.scrollerSeries.StepLine - Self instance for method chaining.Try it:
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.scrollerSeries.StepLine - 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.scrollerSeries.StepLine - Returns self for method chaining.Try it:
yScale
Returns:
anychart.scales.ScatterBase - Series Y-scale.var scroller = chart.scroller(); var series = scroller.line(data); var yScale = series.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.scrollerSeries.StepLine - Self instance for method chaining.Try it:
zIndex
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| zIndex | number | 0 | Value to set. |
Returns:
anychart.core.stock.scrollerSeries.StepLine - Self instance for method chaining.Try it:
