static/district.js
// initial loading function that creates all the chart objects we will need on the page
initial loading function that creates all the chart objects we will need on the page
initial loading function that creates all the chart objects we will need on the page
function createCharts() {
    $(".chart").each(function() {
        var newChart = new Chart(this, {
            type: 'bar',
            data: {},
            options: {
                responsive: true,
                legend: {
                    position: 'top',
                },
                scales: {
                    xAxes: [{
                        ticks: {
                            fontSize: 10
                        }
                    }],
                    yAxes: [{
                        ticks: {
                            beginAtZero:true
                        }
                    }]
                }       
            }
        })
        charts[this.id] = newChart
    })
}
function createCharts ( ) { $ ( ".chart" ) . each ( function ( ) { var newChart = new Chart ( this , { type : 'bar' , data : { } , options : { responsive : true , legend : { position : 'top' , } , scales : { xAxes : [ { ticks : { fontSize : 10 } } ] , yAxes : [ { ticks : { beginAtZero : true } } ] } } } ) charts [ this . id ] = newChart } ) }
initial loading function that creates all the chart objects we will need on the page
initial loading function that creates all the chart objects we will need on the page