1

这是我脚本中的函数

google.setOnLoadCallback(drawChart);
  function drawChart() {
    var data = google.visualization.arrayToDataTable([
      ['Year', 'Sales', 'Expenses'],
      ['2004',  1000,      400],
      ['2005',  1170,      460],
      ['2006',  660,       1120],
      ['2007',  1030,      540]
    ]);

这是选项

  var options = {

  cht=bvs&chs=350x300&chd=t:20,35,10,5|30,55,25,0|5,25,5,5&chxr=1,0,120&chds=0,120&
    chco=0A8C8A,EBB671,DE091A&
    chbh=45,20,15&
    chdl=Large|Medium|Small&
    chg=0,8.3,5,5
      title: ' Distribution  of fare type per Kilometer',
      hAxis: {title: 'Year', titleTextStyle: {color: 'red'}},
       is3D:true,
       colorAxis: {colors: ['green', 'blue']}
    };



   var chart = new           
              google.visualization.ColumnChart(document.getElementById('chart_div'));
    chart.draw(data, options);
  }

但我无法使用此代码显示条形图。我猜 cht , choc 选项实施错误。请指导somone

4

0 回答 0