I am using django-nvd3 as a visualization library,they offer a limited number of supported charts. Is there any way to customize the PieChart offered in the doc,to be a donut chart.
def statistics(request):
context=RequestContext(request)
xdata = ["Apple", "Apricot", "Avocado", "Banana", "Boysenberries", "Blueberries", "Dates", "Grapefruit", "Kiwi", "Lemon"]
ydata = [52, 48, 160, 94, 75, 71, 490, 82, 46, 17]
chartdata = {'x': xdata, 'y': ydata}
charttype = "pieChart"
chartcontainer = 'piechart_container'
data = {
'charttype': charttype,
'chartdata': chartdata,
'chartcontainer': chartcontainer,
'extra': {
'x_is_date': False,
'x_axis_format': '',
'tag_script_js': True,
'jquery_on_ready': False,
}
}
return render_to_response('App/statistics.html',data)
I can change the size of the chart by setting it this way:
{% include_container chartcontainer 426 400 %}