Data Visualization Widgets PieChart

A circular chart widget for HTML JS applications.

Type: Object

The dxPieChart widget is used to embed circular charts (such as pie or doughnut charts) into HTML JS applications.

The following code demonstrates how to create the dxPieChart widget within the "pieChartContainer" container using the dxPieChart jQuery plugin:

<script>
  $(function () {
    $("#pieChartContainer").dxPieChart({
      //Properties of the configuration object are specified here
    });
  });
</script>

To configure the dxPieChart widget, pass a configuration object as the constructor's parameter. The properties of this object represent the widget's configuration options. To specify the options, set the configuration object's properties to the required values. Refer to the Configuration section to find the options that are required to configure your pie chart.

To get started with the dxPieChart widget, refer to the Add a Pie Chart article. To learn more about the dxPieChart's visual elements, refer to the PieChart Elements help section. To learn how to provide data for the dxPieChart widget, refer to the Data Binding section.

Show Example:
jQuery
<div id="pieChartContainer" style="height:400px; max-width:600px; margin: 0 auto"></div>
$(function () {
    $("#pieChartContainer").dxPieChart({
        series: {
            argumentField: 'category',
            valueField: 'value',
            label: {
                visible: true,
                connector: {
                    visible: true
                }
            }
        },
        tooltip: {
            enabled: true,
            percentPrecision: 2,
            customizeText: function (value) {
                return value.percentText;
            }
        },
        title: {
            text: 'Continental Population by 2010 (in millions)'
        },
        legend: {
            horizontalAlignment: 'center',
            verticalAlignment: 'bottom'
        },
        dataSource: [
            { category: 'Oceania', value: 35 },
            { category: 'Africa', value: 1016 },
            { category: 'Americas', value: 936 },
            { category: 'Asia', value: 4149 },
            { category: 'Europe', value: 728 }
        ]
    });
});

Configuration

An object that defines configuration options for the dxPieChart widget.

Methods

This section describes the methods that can be used in code to manipulate the dxPieChart object.

Use the dxPieChart registered method to access the dxPieChart object, as demonstrated in the code below.

var pieChart = $("#pieChartContainer").dxPieChart("instance");

Series Types

This section lists the objects that define options to be used to configure series of particular types.

Chart Elements

This section lists the methods and fields of the dxPieChart elements.