class anychart.core.stock.series.DiscreteBase Improve this Doc
Extends: anychart.core.stock.series.Base
DiscreteBase series class.
Methods Overview
Specific settings | |
getIndex() | Gets series index. |
legendItem() | Legend item settings. |
pointWidth() | Point width settings. |
Data | |
data() | Data settings. |
name() | Series name settings. |
Interactivity | |
enabled() | Element state (enabled or disabled). |
Point Elements | |
tooltip() | Tooltip settings. |
Scales | |
yScale() | Y-scale settings. |
Series | |
allowPointSettings() | Allows to set point settings from data. |
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
Getter for the allowPointSettings flag.
Returns:
boolean - Returns allowPointSettings flag. See listing
var plot = chart.plot(); var series = plot.column(data); var allowPointSettings = series.allowPointSettings();
Setter for the allowPointSettings flag.
Detailed description
Reconfigure series by the allowPointSettings flag.
The following series support allowPointSettings flag:
Note: Other series cannot be affected by the allowPointSettings flag.
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.DiscreteBase - Self instance for method chaining.bottom
Getter for element bottom bound settings.
Returns:
number | string | undefined - Element's bottom bound setting.Setter for element bottom bound settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
bottom | number | string | null | null | Bottom bound settings for the element. |
Returns:
anychart.core.stock.series.DiscreteBase - Returns self for method chaining.Try it:
bounds
Getter for element bounds settings.
Returns:
anychart.core.utils.Bounds - Bounds of the element.Setter for bounds of the element using one parameter.
Params:
Name | Type | Description |
---|---|---|
bounds | anychart.utils.RectObj | anychart.math.Rect | anychart.core.utils.Bounds | Bounds of element. |
Returns:
anychart.core.stock.series.DiscreteBase - Self instance for method chaining.Try it:
Setter for element bounds settings.
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.DiscreteBase - Self instance for method chaining.Try it:
data
Getter for data for the series.
Returns:
anychart.data.TableMapping | anychart.data.Table | Array.<Array.<*>> | string - Returns mapping.Setter for data for the series.
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.DiscreteBase - Self instance for method chaining.Try it:
enabled
Getter for the element state (enabled or disabled).
Returns:
boolean - Element state.Try it:
Setter for the element enabled state.
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | Enabled state to set. |
Returns:
anychart.core.stock.series.DiscreteBase - Self instance for method chaining. Example.
if (!element.enabled()) element.enabled(true);
Try it:
getIndex
getPixelBounds
Returns pixel bounds of the element due to parent bounds and self bounds settings.
Returns:
anychart.math.Rect - Pixel bounds of the element.height
Getter for element height settings.
Returns:
number | string | undefined - Element's height setting.Setter for element height setting.
Params:
Name | Type | Default | Description |
---|---|---|---|
height | number | string | null | null | Height settings for the element. |
Returns:
anychart.core.stock.series.DiscreteBase - Returns self for method chaining.Try it:
left
Getter for element left bound settings.
Returns:
number | string | undefined - Element's left bound setting.Setter for element left bound settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
left | number | string | null | null | Left bound setting for the element. |
Returns:
anychart.core.stock.series.DiscreteBase - Returns self for method chaining.Try it:
legendItem
Getter for the legend item setting for series.
Returns:
anychart.core.utils.LegendItemSettings - Legend item settings.Try it:
Setter for the legend item setting for series.
Params:
Name | Type | Description |
---|---|---|
settings | Object | Legend item settings object. |
Returns:
anychart.core.stock.series.DiscreteBase - Self instance for method chaining.Try it:
maxHeight
Getter for the maximum height.
Returns:
number | string | null - Element's maximum height.Setter for the maximum height.
Params:
Name | Type | Default | Description |
---|---|---|---|
height | number | string | null | null | Maximum height to set. |
Returns:
anychart.core.stock.series.DiscreteBase - Self instance for method chaining.Try it:
maxWidth
Getter for the maximum width.
Returns:
number | string | null - Element's maximum width.Setter for the maximum width.
Params:
Name | Type | Default | Description |
---|---|---|---|
width | number | string | null | null | Maximum width to set. |
Returns:
anychart.core.stock.series.DiscreteBase - Self instance for method chaining.Try it:
minHeight
Getter for the minimum height.
Returns:
number | string | null - Element's minimum height.Setter for the minimum height.
Detailed description
The method sets a minimum height of elements, that will be to remain after a resize of element.
Params:
Name | Type | Default | Description |
---|---|---|---|
height | number | string | null | null | Minimum height to set. |
Returns:
anychart.core.stock.series.DiscreteBase - Self instance for method chaining.Try it:
minWidth
Getter for the minimum width.
Returns:
number | string | null - Element's minimum width.Setter for the minimum width.
Detailed description
The method sets a minimum width of elements, that will be to remain after a resize of element.
Params:
Name | Type | Default | Description |
---|---|---|---|
width | number | string | null | null | Minimum width to set. |
Returns:
anychart.core.stock.series.DiscreteBase - Self instance for method chaining.Try it:
name
Setter for the series name.
Params:
Name | Type | Description |
---|---|---|
name | string | Series name. |
Returns:
anychart.core.stock.series.DiscreteBase - Self instance for method chaining.Try it:
pointWidth
Getter for point width settings.
Returns:
string | number - Point width pixel value.Try it:
Setter for the point width settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
width | number | string | null | '75%' | Point width pixel value. |
Returns:
anychart.core.stock.series.DiscreteBase - Self instance for method chaining.Try it:
right
Getter for element right bound settings.
Returns:
number | string | undefined - Element's right bound setting.Setter for element right bound setting.
Params:
Name | Type | Default | Description |
---|---|---|---|
right | number | string | null | null | Right bound setting for the element. |
Returns:
anychart.core.stock.series.DiscreteBase - Returns self for method chaining.Try it:
tooltip
Setter for the tooltip.
Detailed description
Sets series tooltip settings depending on parameter type:
- 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.DiscreteBase - Self instance for method chaining.top
Getter for element top bound settings.
Returns:
number | string | undefined - Element's top bound setting.Setter for element top bound settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
top | number | string | null | null | Top bound setting for the element. |
Returns:
anychart.core.stock.series.DiscreteBase - Returns self for method chaining.Try it:
width
Getter for element width settings.
Returns:
number | string | undefined - Element's width setting.Setter for element width setting.
Params:
Name | Type | Default | Description |
---|---|---|---|
width | number | string | null | null | Width settings for the element. |
Returns:
anychart.core.stock.series.DiscreteBase - Returns self for method chaining.Try it:
yScale
Getter for the Y-scale.
Returns:
anychart.scales.ScatterBase - Series Y-scale. See listing
var plot = chart.plot(); var plotSeries = plot.line(data); var yScale = plotSeries.yScale();
Setter for the Y-scale.
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.DiscreteBase - Self instance for method chaining.Try it:
zIndex
Setter for the Z-index of the element.
Detailed description
The bigger the index - the higher the element position is.
Params:
Name | Type | Default | Description |
---|---|---|---|
zIndex | number | 0 | Value to set. |
Returns:
anychart.core.stock.series.DiscreteBase - Self instance for method chaining.Try it: