JavaScript/jQuery PieChart - series
A series represents a group of related data points. To configure a series, assign an object to the series option. If PieChart must contain several series, assign an array of such objects to the same option. Refer to the Series Overview topic to learn the basics of what a series is, what it does, and how it helps.
The definitive characteristic of a series is its type. The PieChart widget provides two series types - Pie and Doughnut.
When you have a multi-series pie, settings that are common for all series can be specified all together. Use the commonSeriesSettings object to do this.
argumentType
By default, the series arguments have the same type as the values of a corresponding data source field. If the data source field values are numeric, the series arguments will also be numeric, etc. However, you can convert the data source values to another type. In this instance, specify the required type using the argumentType option.
Use the ChartDataType
enum to specify this option when the widget is used as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control. This enum accepts the following values: Numeric
, DateTime
, and String
.
hoverMode
The following values are available.
- onlyPoint
Changes the appearance of the hovered point only. - none
The appearance of the hovered series is not changed.
To set custom options for the 'hover' style (which is applied when a series is hovered over), use the hoverStyle configuration object.
Use the PieChartSeriesInteractionMode
enum to specify this option when the widget is used as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control. This enum accepts the following values: OnlyPoint
and None
.
label
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 the series.
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.
When there is a 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.
selectionMode
The **PieChart** widget comes with an API that allows you to select a series or a particular point in code. Use the selectionMode property to specify which series elements to select when the series is selected.
- onlyPoint
Changes the appearance of the selected point only. - none
The appearance of the selected series is not changed.
To set custom options for the 'selected' style (which is applied when a series is selected), use the selectionStyle configuration object.
Use the PieChartSeriesInteractionMode
enum to specify this option when the widget is used as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control. This enum accepts the following values: OnlyPoint
and None
.
smallValuesGrouping
If you need to group specific chart segments into one, use the options of the smallValuesGrouping configuration object.
You can group segments in two different modes. Use a 'topN' mode to group all segments that have an index that is equal to or greater than the value of the topCount option. To group all segments with the value less than the value of the threshold option, use a 'smallValueThreshold' mode.
By default, the resulting segment is called "others". To change this name, specify the groupName option.
tagField
When setting a data source, you can pass extra 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 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/hovering/selecting a point in the chart, you can access the data associated with this point using the point's instance.