This example demonstrates the PieChart component that visualizes data as a circle divided into points (slices) to illustrate data proportions.
To get started with the DevExtreme PieChart component, refer to the following tutorial for step-by-step instructions: Getting Started with PieChart.
This demo uses an array as a PieChart data source. To bind the PieChart to data, pass the array to the PieChart's dataSource property.
To display data, specify the series nested options - argumentField and valueField - with the corresponding object fields (arguments and values) in the array.
Use the title property to specify and configure the PieChart's title.
You can accompany each series point with a label that displays the point's value or custom data. To make point labels visible, assign
true to the series.label.visible property. With this configuration, the component displays point labels detached from their respective series points. To make the connection between labels and points visible, set the label.connector.visible property to
To process point and legend clicks, use the onPointClick and onLegendClick functions. This demo uses these event handlers to toggle point visibility.
true to the export.enabled property to enable PieChart export.