The Series
class is used to configure individual series in a chart.
Options to improve accessibility for series elements.
Options for customizing the animation of the series.
By default, animation is enabled with a duration of 1000 milliseconds (about 1 second). It can be disabled by setting enable to false
.
The following properties are supported in animation:
string
This property is used in financial charts to visualize price movements in stocks. It defines the color of the candle/point when the opening price is less than the closing price.
Defaults to null
number
The binInterval
property controls the width of each bin and the interval between bins for histogram points.
Defaults to null
Options for customizing the border of the series.
Note that this property is applicable only for
Column
andBar
type series.
Specifies the box plot mode for the box and whisker chart series. The available modes are: Exclusive - Renders the series based on the exclusive mode. Inclusive - Renders the series based on the inclusive mode. Normal - Renders the series based on the normal mode.
Defaults to ‘Normal’
string
This property is used in financial charts to visualize price movements in stocks. It defines the color of the candle/point when the opening price is higher than the closing price.
Defaults to null
number
Specifies the tension parameter for cardinal splines. This affects the curvature of the spline.
Defaults to 0.5
string
The data source field that contains the close value. It is applicable for both financial series and technical indicators.
Defaults to ”
string
The data source field that contains the color mapping value. It is applicable for range color mapping.
Defines the shape of the data in a column and bar chart. Available shapes are:
Defaults to ‘Rectangle’
number
This property determines the space between columns in a column or bar chart.
Note that it takes a value from 0 to 1.
Defaults to 0
number
The columnWidth
property can be used to customize the width of the columns in a column series.
Note that if the series type is histogram, the default value is 1; otherwise, it is 0.7.
Defaults to null
number
To render the column series points with a specific column width in pixels.
Defaults to null
Specifies the appearance of the line connecting adjacent points in waterfall charts.
The cornerRadius
property specifies the radius for the corners of the column series points to create a rounded appearance in the chart.
string
Defines the pattern of dashes and gaps used to stroke the lines in Line
type series.
Defaults to ”
Object
| DataManager
Specifies the data source for the series. It can be an array of JSON objects, or an instance of DataManager.
<div id='Chart'></div>
let dataManager: DataManager = new DataManager({
url: 'https://services.syncfusion.com/js/production/api/orders'
});
let query: Query = new Query().take(5);
let chart: Chart = new Chart({
...
series: [{
type: 'Column',
dataSource: dataManager,
xName: 'CustomerID',
yName: 'Freight',
query: query
}],
...
});
chart.appendTo('#Chart');
Defaults to ”
Customize the drag settings for the series with this property to configure drag behavior in the chart.
Specifies the type of series to be drawn in radar or polar charts. The available options are:
Defaults to ‘Line’
Customization options for the appearance of empty points in the series.
null
or undefined
values are considered empty points.
boolean
This property is used to improve chart performance through data mapping for the series data source.
Defaults to false
boolean
This property is applicable for the candle series. It enables or disables the visual comparison of the current values with previous values in stock charts.
Defaults to false
boolean
Controls whether the tooltip for the chart series is enabled or disabled. Set to true to display tooltips on hover, or false to hide them.
Defaults to true
Options for displaying and customizing error bars for individual points in a series.
string
The fill color for the series, which accepts values in hex or rgba as a valid CSS color string. It also represents the color of the signal lines in technical indicators. For technical indicators, the default value is ‘blue’, and for series, it is null.
Defaults to null
string
Defines the name that specifies the chart series are mutually exclusive and can be overlaid. Series in the same group share the same baseline and location on the corresponding axis.
Defaults to ”
string
The data source field that contains the high value. It is applicable for both financial series and technical indicators.
Defaults to ”
number[]
Defines the collection of indexes for the intermediate summary columns in waterfall charts.
Defaults to []
boolean
Specifies whether to join the start and end points of a line/area series used in a polar/radar chart to form a closed path.
Defaults to true
string
The URL for the image to be displayed as a legend icon.
Note that
legendShape
must be set toImage
.
Defaults to ”
Specifies the shape of the legend icon for each series. Available shapes for legend:
Defaults to ‘SeriesType’
string
The data source field that contains the low value. It is applicable for both financial series and technical indicators.
Defaults to ”
Options for displaying and customizing markers for individual points in a series.
number
Specifies the maximum radius for the data points in the series.
Defaults to 3
number
Specifies the minimum radius for the data points in the series.
Defaults to 1
string
The name
property allows setting a name for the series, which will be displayed in the legend, identifying different series in the chart, especially when multiple series are present.
Defaults to ”
string
Defines the visual representation of negative changes in waterfall charts.
Defaults to ‘#C64E4A’
boolean
When set to true, the step series will be rendered without the vertical lines (risers) connecting the horizontal steps.
Note this property is only applicable to step series.
Defaults to false
string
The nonHighlightStyle
property is used to specify custom CSS styles for the non-highlighted series or points.
Defaults to null
number
Sets the opacity of the series, with a value between 0 and 1 where 0 is fully transparent and 1 is fully opaque.
Defaults to 1
string
The data source field that contains the open value. It is applicable for both financial series and technical indicators.
Defaults to ”
Options for customizing the Pareto line series, including its appearance and behavior in the chart.
string
The data source field that contains the color value of a point. It is applicable for series.
Defaults to ”
Query
Specifies a query to select data from the data source. This property is applicable only when the data source is an ej.DataManager
.
Defaults to ”
Defines the axis along which the line series will be split.
Specifies a collection of regions used to differentiate a line series.
string
The selectionStyle
property is used to specify custom CSS styles for the selected series or points.
Defaults to null
boolean
If set to true, the mean value for the box and whisker plot will be visible.
Defaults to true
boolean
Specifies whether to display the normal distribution curve for the histogram series.
Defaults to false
string
The data source field that contains the size value for the y-axis.
Defaults to ”
Specifies the type of spline used for rendering. Available options include:
Defaults to ‘Natural’
string
This property allows the grouping of series in stacked column and stacked bar charts.
Any string value can be assigned to the stackingGroup
property.
Series with the same stackingGroup
value will be grouped together in the chart.
Defaults to ”
The step
property can be used to change the position of the steps in step line, step area, and step range area chart types.
Defaults to ‘Left’
number[]
Defines the collection of indexes for the overall summary columns in waterfall charts.
Defaults to []
string
Defines the visual representation of summaries in waterfall charts.
Defaults to ‘#4E81BC’
string
Use this property to define a custom format for how tooltips are displayed.
<div id='Chart'></div>
let chart: Chart = new Chart({
...
series: [{
dataSource: data,
xName: 'x',
yName: 'y',
tooltipFormat: '${point.x} : ${point.y}'
}],
tooltip: {
enable: true
}
});
chart.appendTo('#Chart');
Defaults to ”
string
The data source field that contains the value to be displayed in the tooltip.
Defaults to ”
Defines the collection of trendlines used to predict the trend.
The type of the series determines the visual representation of the data. Available series types include:
Defaults to ‘Line’
string
The unSelectedStyle
property is used to specify custom CSS styles for the deselected series or points.
Defaults to null
boolean
If set to true
, the series will be visible. If set to false
, the series will be hidden.
Defaults to true
string
Defines the data source field that contains the volume value in candle charts. It is applicable for both financial series and technical indicators.
Defaults to ”
number
The stroke width for the series, applicable only for Line
type series.
It also represents the stroke width of the signal lines in technical indicators.
Defaults to 1
string
The name of the horizontal axis associated with the series. It requires axes
of the chart.
It is applicable for series and technical indicators.
<div id='Chart'></div>
let chart: Chart = new Chart({
...
columns: [{ width: '50%' },
{ width: '50%' }],
axes: [{
name: 'xAxis 1',
columnIndex: 1
}],
series: [{
dataSource: data,
xName: 'x', yName: 'y',
xAxisName: 'xAxis 1'
}],
});
chart.appendTo('#Chart');
Defaults to null
string
The data source field that contains the x value. It is applicable to both series and technical indicators.
Defaults to ”
string
The name of the vertical axis associated with the series. It requires axes
of the chart.
It is applicable for series and technical indicators.
<div id='Chart'></div>
let chart: Chart = new Chart({
...
rows: [{ height: '50%' },
{ height: '50%' }],
axes: [{
name: 'yAxis 1',
rowIndex: 1
}],
series: [{
dataSource: data,
xName: 'x', yName: 'y',
yAxisName: 'yAxis 1'
}],
});
chart.appendTo('#Chart');
Defaults to null
string
The data source field that contains the y value.
Defaults to ”
number
The z-order of the series, which controls the stack order of the series. Higher values are drawn on top of lower values.
Defaults to 0
Adds a data point to the data source.
Parameter | Type | Description |
---|---|---|
dataPoint | Object |
The data point to be added. |
duration (optional) | number |
The duration for the animation. |
Returns void
Formats the accessibility description for a chart series.
Parameter | Type | Description |
---|---|---|
point | Points |
Data point containing the values to be formatted. |
series | Series |
Series containing the values to be formatted. |
Returns string
Removes a data point from the series data source at the specified index.
Parameter | Type | Description |
---|---|---|
index | number |
The index of the data point to be removed. |
duration (optional) | number |
The duration for the animation. |
Returns void
Sets the data source with the provided data.
Parameter | Type | Description |
---|---|---|
data | Object[] |
An array of objects representing the data points. |
duration (optional) | number |
The duration for the animation. |
Returns void