Google图表,3列,2列组合在一起,如何使用isStacked?

时间:2018-12-15 16:06:04

标签: charts google-visualization

请提供有关Google图表的帮助。 我有3列,我需要配对,第3列不留任何内容。

下面附上图片和使用的代码。

谢谢 TK

<script type="text/javascript">
  google.load("visualization", "1", {packages:["corechart"]});
  google.setOnLoadCallback(drawChart);
  function drawChart() {

    var data_M = google.visualization.arrayToDataTable([
          ['Sec', 'A1','A2','A3','Limit'],
          ["ADD",0,2,0,6],
          ["COM",null,null,null,null],
          ["CUD",6,3,5,5],
          ["CUF",3,1,0,6],
          ["HAR",6,0,4,5],
          ["PRESS",1,5,0,4]
    ]);

  var options_M = { title: 'Action 2018' , colors: ['blue','#009530','red','orange'],isStacked: false,vAxis: {format: '0'},series: { 3: {type:'steppedArea'} } };    


    var chart_M = new google.visualization.ColumnChart(document.getElementById('chart_M'));
    chart_M.draw(data_M, options_M);


  }

Current chart and below required

0 个答案:

没有答案