2016-08-11 10 views

答えて

1

あなただけのシリーズ番号を

を割り当てるvisibleInLegendconfiguration option

を使用することができ、作業スニペット次...

google.charts.load('current', { 
 
    callback: function() { 
 
    var data = google.visualization.arrayToDataTable([ 
 
     ['File', 'fileSize', 'output Target'], 
 
     ['a', 10, 15], 
 
     ['b', 12, 18], 
 
     ['c', 14, 21], 
 
     ['d', 16, 24] 
 
    ]); 
 

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

 
    chart.draw(data, { 
 
     legend: { 
 
     position: 'bottom' 
 
     }, 
 
     series: { 
 
     0: { 
 
      visibleInLegend: false 
 
     } 
 
     } 
 
    }); 
 
    }, 
 
    packages: ['corechart'] 
 
});
<script src="https://www.gstatic.com/charts/loader.js"></script> 
 
<div id="chart_div"></div>

+0

おかげで多くを参照してください。それが私が探していたものです。 – TheDoctor