Configuration series

Specifies options for dxChart widget series.

Type: Object|Array
Default Value: undefined

A series represents a grouping of related data points. The most important characteristic of a series is its type, which determines a particular visual representation of data. You can find more details on each series type in the corresponding topics in the Series help section.

To define a single series, assign an object defining the series to the series configuration object. In the series' object, specify the series type, data source fields, the appearance of the series points and other options.

To show several series, specify series as an array of objects defining series. If you need to set similar values to properties of several series, use the commonSeriesSettings configuration object. It exposes the properties that can be specified for all series at once and for all series of a particular type at once. Note that the values specified for a series individually (in the series array) override the values that are specified for all series (in the commonSeriesSettings object).

NOTE: This option is necessary. If you do not need to specify any of the options within the series object (e.g., when you have specified them within the commonSeriesSettings object), assign at least an empty object to the series field.

Show Example:
jQuery
<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { arg: 'January', minT: 4.1, maxT: 15.5, avgT: 9.85 },
    { arg: 'February', minT: 5.8, maxT: 17.8, avgT: 11.8 },
    { arg: 'March', minT: 7.2, maxT: 19.6, avgT: 13.4 },
    { arg: 'April', minT: 8.1, maxT: 22.8, avgT: 15.4 },
    { arg: 'May', minT: 10.3, maxT: 25.7, avgT: 18 },
    { arg: 'June', minT: 12.2, maxT: 29, avgT: 20.6 },
    { arg: 'July', minT: 13.2, maxT: 31.3, avgT: 22.1 },
    { arg: 'August', minT: 13.2, maxT: 31.1, avgT: 22.2 },
    { arg: 'September', minT: 12.4, maxT: 29.9, avgT: 21.2 },
    { arg: 'October', minT: 9.7, maxT: 26.1, avgT: 17.9 },
    { arg: 'November', minT: 6.2, maxT: 19.6, avgT: 12.9 },
    { arg: 'December', minT: 3.4, maxT: 15.7, avgT: 9.6 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'arg'
        },
        series: [{
            type: 'rangeArea',
            rangeValue1Field: 'minT',
            rangeValue2Field: 'maxT',
            name: 'Monthly Temperature Ranges, °C'
        }, {
            valueField: 'avgT',
            name: 'Average Temperature, °C'
        }
        ],
        legend: {
            verticalAlignment: 'bottom',
            horizontalAlignment: 'center'
        }
    });
});

argumentField

Specifies the data source field that provides arguments for series points.

Type: String
Default Value: 'arg'

When defining series using the series configuration object, set the argumentField property to the corresponding field from the data source for each series individually. If the field that supplies arguments for data points is called in a similar way for several series, there is no need to set the field name for each series individually. Instead, set the field name for the argumentField property of the commonSeriesSettings configuration object at once.

axis

Specifies the name of the value axis that will be used to display the series.

Type: String
Default Value: undefined

This property is required when you implement a dxChart widget with multiple value axes. Set names for the value axes using the name property, and assign these names to the series' axis property.

border

An object defining the series border configuration options.

Series of some types can be displayed with borders (bars, area, etc.). To set custom border settings for all such series at once, use the border object within the commonSeriesSettings configuration object.

If you have several series of one type, you can set border options specific to this type using the corresponding object (area, line, or another) within the commonSeriesSettings configuration object. In addition, any non-specific series type property of the commonSeriesSettings | border object can be added to the series-type-specific border definition within the commonSeriesSettings | area/line/... | border configuration object. The values that are set within series-type-specific configuration objects override the corresponding common values.

In case you have to set an individual value for a common or series-type-specific border option, use the border object within the series object of the series array. The values that are set individually override corresponding common values.

closeValueField

Specifies the data source field that provides a 'close' value for a candleStick or stock series.

Type: String
Default Value: 'close'
This member is exposed by the following entities:

This property is analogous to the openValueField property. So refer to this property for a description.

color

Specifies a series color.

Type: String
Default Value: undefined

Color is used to distinguish one chart series from another. However, there can be cases when it is more appropriate to display all chart series in one color. In this case, set the color property of the commonSeriesSettings configuration object. If required, you can override this property's common value in individual series objects.

cornerRadius

Specifies a radius for bar corners.

Type: Number
Default Value: 0
This member is exposed by the following entities:

dashStyle

Specifies the dash style of the series' line.

Type: String
Default Value: 'solid'
Accepted Values: 'solid'|any combination of 'longDash', 'dash', 'dot'
This member is exposed by the following entities:

highValueField

Specifies the data source field that provides a 'high' value for a candleStick or stock series.

Type: String
Default Value: 'high'
This member is exposed by the following entities:

This property is analogous to the openValueField property. So refer to this property for a description.

hoverMode

Specifies the series elements to highlight when a series is hovered over.

Type: String

Refer to the hoverMode option of a particular series type to learn the acceptable values.

hoverStyle

An object defining configuration options for a hovered series.

Type: Object

To set a custom 'hover' style for all series at once, use the hoverStyle object within the commonSeriesSettings configuration object.

If you have several series of one type, you can set hover style options to the values specific to this type using the corresponding object (area, line or another) within the commonSeriesSettings configuration object. The values that are set within series-type-specific configuration objects override the corresponding common values.

In case you have to set a hover style option for an individual series, use the hoverStyle object within the series object of the series array. The values that are set individually override corresponding common values.

ignoreEmptyPoints

Specifies whether or not a chart ignores null data points.

Type: Boolean
Default Value: false
Accepted Values: true|false

By default, if a data source has data points with a null argument or value, a chart may draw series with unnecessary gaps between points. To prevent this behavior, set the ignoreEmptyPoints option to true.

innerColor

Specifies the color for the body (rectangle) of a candleStick series.

Type: String
Default Value: '#ffffff'
This member is exposed by the following entities:

To set the line color for candleStick series points, use the color property.

label

An object defining the label configuration options.

Type: Object

Each series point can be accompanied by a text label that represents data related to the point. These are called series point labels. Use the label object's properties to set label options for all chart series at once.

Specify the label object's properties within the commonSeriesSettings configuration object to set label options for all chart series at once.

If you have several series of a single type, you can set label options to the values specific to this series type using the corresponding object (area, line, etc.) within the commonSeriesSettings configuration object. The values that are set within series-type-specific configuration objects override the corresponding common values.

If you need to set a label option for an individual series, use the label object within the series object of the series array. The values that are set individually override the corresponding common values.

lowValueField

Specifies the data source field that provides a 'low' value for a candleStick or stock series.

Type: String
Default Value: 'low'
This member is exposed by the following entities:

This property is analogous to the openValueField property. So refer to this property for a description.

maxLabelCount

Specifies how many points are acceptable to be in a series to display all labels for these points. Otherwise, the labels will not be displayed.

Type: Number
Default Value: undefined

When there are several series in a chart and series with a large number of points, the point labels may overlap each other and make a chart difficult to read. In this instance, it is better to display the point labels depending on their quantity. To specify the maximum amount of the labels to be displayed, set the required number to the maxLabelCount field. If the number of the points on a series exceeded the number assigned to the maxLabelCount field, the point labels for this series will not be displayed.

minBarSize

Specifies a minimal size of a displayed bar in pixels.

Type: Number
Default Value: undefined
This member is exposed by the following entities:

When you visualize data with small and large numbers as a bar-like series, the small numbers are represented by very small bars. It makes them difficult to click, select or hover over. In such a case, use the minBarSize option to set the minimal size of a displayed bar.

name

Specifies the name that identifies the series.

Type: String
Default Value: undefined

The series name is used to represent the series in the legend. If this property is not specified, a default name will be auto generated.

opacity

Specifies opacity for a series.

Type: Number
Default Value: 0.5

openValueField

Specifies the data source field that provides an 'open' value for a candleStick or stock series.

Type: String
Default Value: 'open'
This member is exposed by the following entities:

When defining series, you can either use the series object or the commonSeriesSettings object. When using the series object, set the openValueField, highValueField, lowValueField and closeValueField options to the corresponding fields of the data source. The same options can be specified within the commonSeriesSettings object, but only when you use series templates in your chart.

pane

Specifies the pane that will be used to display a series.

Type: String
Default Value: 'default'

point

An object defining configuration options for points in line-, scatter- and area-like series.

To specify point options for all line-, scatter- and area-like series at once, use the properties of the point object defined within the commonSeriesSettings configuration object.

If you have several series of a single type, you can set point options to the values specific to this series type using the corresponding object (area, line etc.) within the commonSeriesSettings configuration object. The values that are set within series-type-specific configuration objects override their corresponding common values.

If you need to set a point option for an individual series, use the point object within the series object of the series array. The values that are set individually override their corresponding common values.

rangeValue1Field

Specifies the data source field that provides values for one end of a range series. To set the data source field for the other end of the range series, use the rangeValue2Field property.

Type: String
Default Value: 'val1'
This member is exposed by the following entities:

When defining series, you can either use the series object or the commonSeriesSettings object. When using the series object, set the rangeValue1Field and rangeValue2Field options to the corresponding fields of the data source. The same options can be specified within the commonSeriesSettings object, but only when you use series templates in your chart.

rangeValue2Field

Specifies the data source field that provides values for the second end of a range series. To set the data source field for the other end of the range series, use the rangeValue1Field property.

Type: String
Default Value: 'val2'
This member is exposed by the following entities:

This property is analogous to the rangeValue1Field property. So refer to this property for a description.

reduction

Specifies reduction options for the stock or candleStick series.

Type: Object
This member is exposed by the following entities:

If the value of a particular point's price level (open, high, low or close) is lower in comparison to the value in the previous point, the subsequent point is painted in a specific color. To set the price to be compared in the series, use the series' level property. To set the specific color for a subsequent price, which is lower than that price in the previous point, use the series's color property.

selectionMode

Specifies the series elements to highlight when the series is selected.

Type: String

Refer to the selectionMode option of a particular series type to learn the acceptable values.

selectionStyle

An object defining configuration options for a selected series.

Type: Object

The dxChart widget comes with API members that allow you to select a series in code. To set a custom 'selected' style for all series at once, use the selectionStyle object within the commonSeriesSettings configuration object.

If you have several series of one type, you can set selection style options to the values specific to this type using the corresponding object (area, line or another) within the commonSeriesSettings configuration object. The values that are set within series-type-specific configuration objects override the corresponding common values.

In case you have to set a selection style option for an individual series, use the selectionStyle object within the series object of the series array. The values that are set individually override corresponding common values.

showInLegend

Specifies whether or not to show the series in the chart's legend.

Type: Boolean
Default Value: true
Accepted Values: true|false

stack

Specifies the name of the stack where the values of the stackedBar or fullStackedBar series must be located.

Type: String
Default Value: 'default'
This member is exposed by the following entities:

By default, this property is set to 'default' for all series of the stackedBar and fullStackedBar types. So values of all series are located in one stack for each argument value. You can set the stack property to another value for one group of the series and leave the 'default' value for the other group of series. In this instance, series will be divided into two stacks for each argument. In this manner, you can divide series between the required number of logical stacks.

You can set this property for a series individually, for all stackedBar series, for all fullStackedBar series or for all series in the chart. For this purpose choose the appropriate configuration object for this property: series, commonSeriesSettings | stackedBar, commonSeriesSettings | fullStackedBar or commonSeriesSettings.

tag

Specifies data about a series.

Type: any
Default Value: undefined

To associate information about a series with the series instance, set the tag property of the series object defined within the series array. In this instance, when clicking a series in the chart, you can access the data associated with it using the series' instance.

You can also associate data with series points. To learn how to do this, refer to the description of the tagField property.

tagField

Specifies the name of the data source field that provides data about a point.

Type: String
Default Value: 'tag'

When setting a common data source via the dataSource property, you can pass information about a point. For this purpose, add a separate field to the data source in addition to the argument and value fields. To set the specified data to the point instance, set the series' tagField property to the name of the field with the information. In this instance, when clicking a point in the chart, you can access the data associated with this point using the point's instance.

When defining series using the series configuration object, set the tagField property to the corresponding field from the data source for each series individually. If the field that supplies data about points is called similarly in several series, there is no need to set its name for each series individually. Instead, set it for the tagField property of the commonSeriesSettings configuration object.

You can also associate data with a series instance. To learn how to do this, refer to the description of the tag property of the series configuration object.

type

Sets the series type.

Type: String
Default Value: 'line'
Accepted Values: 'line' | 'stackedline' | 'fullstackedline' | 'area' | 'stackedarea' | 'fullstackedarea' | 'bar' | 'stackedbar' | 'fullstackedbar' | 'spline' | 'splinearea' | 'scatter' | 'candlestick' | 'stock' | 'rangearea' | 'rangebar' | 'stepline' | 'steparea' | 'bubble'

valueField

Specifies the data source field that provides values for series points.

When defining series using the series configuration object, set the valueField property for each series individually to the corresponding field from the data source. In case you use series templates, specify the valueField property of the commonSeriesSettings configuration object.

The valueField property is considered for the series whose data points are set by an argument and one corresponding value. However, there are series whose data points are set by an argument and two corresponding values (e.g., range series). To set data fields for these types of series, use the rangeValue1Field and rangeValue2Field properties of the series configuration object. In addition, there are financial series, which have four values per argument. To set data fields for these types of series, use the openValueField, highValueField, lowValueField and closeValueField properties of the series configuration object.

width

Specifies a width for a line in the series.

Type: Number
Default Value: 2
This member is exposed by the following entities: