$(function($) { var chart1 = new Highcharts.Chart({ chart: { renderTo: 'barChart', type: 'bar' }, title: { text: '{{ barData.getReportTitle() }}' }, xAxis: { categories: [{{ barData.getCategoriesSeparatedByComma()|raw }}], title: { text: null } }, yAxis: { min: 0, title: { //text: 'Population (millions)', align: 'high' }, labels: { overflow: 'justify' } }, tooltip: { //valueSuffix: ' millions' }, plotOptions: { bar: { dataLabels: { enabled: true } } }, legend: { layout: 'vertical', align: 'right', verticalAlign: 'top', x: -40, y: 100, floating: true, borderWidth: 1, backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'), shadow: true }, credits: { enabled: false }, series: [{% spaceless %} {% for alias, series in barData.getSeries() %} {% spaceless %} { name: '{{ series }}', data: [{{ barData.getSeriesDataSeparatedByComma(alias)|raw }}]}{% if not loop.last %},{% endif %} {% endspaceless %} {% endfor %} {% endspaceless %}] }); });