A pie chart is a circular chart divided into sectors where the arc length of each sector,
its central angle, and its area is proportional to the quantity it represents.
You can learn more
The caption (also called the chart title) is the heading of your chart. You can add custom text for the caption, as well as configure its font properties and cosmetics. Learn more about it
Data plot refers to the pie slices in a pie chart, columns of the column chart, lines in a line chart.
Data labels refers to the labels associated with each pie slice
Data values refers to values associated with each pie slice.
A legend is a chart element used to display the series name for each dataset, in case of multi-series or combination charts. Legends are used to correlate a data plot to its series name using its color.
A tooltip is displayed when the mouse cursor hovers over a particular data point. It denotes valuable information about the data plot hovered.
Export menu is hamburger menu that appears on top-right of the chart, it offers different options to export a chart.You can enable or disable chart export using attribute
exportEnabled. Refer to Exporting Charts to learn more.
Create a Pie Chart
Let's create our first pie chart which will showcase the split of visitors for one year.To create a pie chart follow the steps given below:
- In the JSON data, set the attributes and their corresponding values in
"<attributeName>": "<value> "format.
- Specify the chart type using the
typeattribute. To render a pie chart, set
- Set the container object using
- Specify the dimension of the chart using
- Set the type of data (JSON/XML) you want to pass to the chart object using
For a detailed list of attributes, refer to the pie charts attribute page.
The pie chart for the above code looks like: