static/district.js
// requires state coming in FIPS number
requires state coming in FIPS number
requires state coming in FIPS number
function updateCensusCharts(state="06", district="27") {
    for (var chart in charts) {
        chartObj = charts[chart]
        chartObj["data"].datasets.length=0
        chartObj.update()
        jQuery.get("/getdata/census?chart_name="+chart+"&state="+state+"&district="+district, updateChartReturn(chart))
    }
}
function updateCensusCharts ( state = "06" , district = "27" ) { for ( var chart in charts ) { chartObj = charts [ chart ] chartObj [ "data" ] . datasets . length = 0 chartObj . update ( ) jQuery . get ( "/getdata/census?chart_name=" + chart + "&state=" + state + "&district=" + district , updateChartReturn ( chart ) ) } }
requires state coming in FIPS number
requires state coming in FIPS number
// wipe out all the existing data // Eliminate the old data // Pull thew new data