如何在Google图表中插入列

时间:2019-05-16 11:06:44

标签: charts google-visualization

var options = {     高度:300,  title:“按价值排名前5位的债务人”,

条形图:'vertical',//材质条形图必需。

      legend:  { position: 'bottom' }

};         var chart = new google.visualization.BarChart(document.getElementById(“ ChartNoCallCenterCollections2”)))

    //Listen for error message and blank out
    google.visualization.events.addListener(chart, 'error', function (googleError) {
        google.visualization.errors.removeError(googleError.id);
        document.getElementById("error_msg").innerHTML = "Message removed = '" + googleError.message + "'";
    });

    //var options1 = $.extend({}, optionslight, options);

    google.visualization.events.addListener(chart, 'select', selectHandler);   


    for (var i = 0; i < data.getNumberOfRows(); i++) {

            data.insertColumn(3, string, 'color: #42c698' );

     }

  var csv = google.visualization.dataTableToCsv(data);
  alert(csv);

  chart.draw(data, options);

0 个答案:

没有答案