class nvd3.pieChart.pieChart(**kwargs)

A pie chart (or a circle graph) is a circular chart divided into sectors, illustrating numerical proportion. In chart, the arc length of each sector is proportional to the quantity it represents.

Python example:

from nvd3 import pieChart
chart = pieChart(name='pieChart', color_category='category20c',
                 height=400, width=400)

xdata = ["Orange", "Banana", "Pear", "Kiwi", "Apple", "Strawbery",
ydata = [3, 4, 0, 1, 5, 7, 3]

extra_serie = {"tooltip": {"y_start": "", "y_end": " cal"}}
chart.add_serie(y=ydata, x=xdata, extra=extra_serie)

Javascript generated:

See the HTML source code of this page, to see the underlying javascript.