$(function($) { var chart2 = new Highcharts.Chart({ chart: { renderTo: 'pieChart', plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false }, title: { text: '{{ pieData.getReportTitle() }}' }, tooltip: { pointFormat: '{series.name}: {point.y} ({point.percentage:.1f}%)' }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: false }, showInLegend: true } }, series: [{ type: 'pie', name: '{{ pieData.getTooltipDescription() }}', data: [{% spaceless %} {% for data in pieData.getData() %} ['{{ data.label|e('js') }}', {{ data.value }}]{% if not loop.last %},{% endif %} {% endfor %} {% endspaceless %}] }] }); });