// Load the Visualization API and the piechart package.
google.load('visualization', '1.0', {'packages':['corechart']});

// Set a callback to run when the Google Visualization API is loaded.
google.setOnLoadCallback(drawChart);

// Callback that creates and populates a data table,
// instantiates the pie chart, passes in the data and
// draws it.
function drawChart() {

    $.get(csv_url, function(csvString) {
        var rawData = $.csv.toArrays(csvString, {onParseValue: $.csv.hooks.castToScalar});
        var hxlData = new HXLDataset(rawData);

        var chartData = [[chart_label_tag, chart_value_tag]];
        var iterator = hxlData.iterator();
        while (row = iterator.next()) {
            var label = row.get(chart_label_tag);
            var value = row.get(chart_value_tag);
            if (!isNaN(value)) {
                chartData.push([label, 0 + value]);
            }
        }

        var data = google.visualization.arrayToDataTable(chartData);

        var options = {
            width: '100%',
            height: '600'
        };

        var chart = new google.visualization.PieChart(document.getElementById('chart_div'));

        chart.draw(data, options);
    });
}

@@ -1061,16 +1061,484 @@
     %7D;%0A%0A
+        if (chart_type == 'bar') %7B%0A            var chart = new google.visualization.BarChart(document.getElementById('chart_div'));%0A        %7D else if (chart_type == 'column') %7B%0A            var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));%0A        %7D else %7B%0A            if (chart_type && chart_type != 'pie') %7B%0A                alert(%22Unknown chart type: %22 + chart_type + %22%5CnPlease use 'bar', 'column', or 'pie'%22);%0A            %7D%0A    
         
@@ -1621,16 +1621,26 @@
 _div'));
+%0A        %7D
 %0A%0A      

Add support for bar and column charts back in.