Overlapping graphs

2

I need to make a chart like this

But I did not find anything that could help me. Does anyone have a solution for this?

    
asked by anonymous 24.10.2016 / 18:19

1 answer

1

You can use the battery chart.

<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script><divid="chart_div"></div>

google.charts.load('current', {packages: ['corechart', 'bar']});
google.charts.setOnLoadCallback(drawBasic);

function drawBasic() {

      var data = google.visualization.arrayToDataTable([
        ['Genre', 'Fantasy & Sci Fi', 'Romance', 'Mystery/Crime', 'General',
         'Western', 'Literature', { role: 'annotation' } ],
        ['2010', 10, 24, 20, 32, 18, 5, ''],
        ['2020', 16, 22, 23, 30, 16, 9, ''],
        ['2030', 28, 19, 29, 30, 12, 13, '']
      ]);

      var options = {
        width: 600,
        height: 400,
        legend: { position: 'top', maxLines: 3 },
        bar: { groupWidth: '75%' },
        isStacked: true
      };

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

      chart.draw(data, options);
    }

Image of the chart:

Seeworkingat JsFidlle

Google Docs documentation .

    
24.10.2016 / 18:24