Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The Google Developers site gives some details on the bar chart format: <a href="https://developers.google.com/chart/interactive/docs/gallery/barchart" rel="nofollow noreferrer">https://developers.google.com/chart/interactive/docs/gallery/barchart</a></p> <p>To make a normal bar chart stacked, you need to user the <code>isStacked: true</code> option. You can copy and paste the following code into the Chart Tools playground to see a working example: <a href="http://code.google.com/apis/ajax/playground/?type=visualization" rel="nofollow noreferrer">http://code.google.com/apis/ajax/playground/?type=visualization</a></p> <pre><code>function drawVisualization() { // Create and populate the data table. var data = google.visualization.arrayToDataTable([ ['Year', 'Austria', 'Bulgaria', 'Denmark', 'Greece'], ['2003', 1336060, 400361, 1001582, 997974], ['2004', 1538156, 366849, 1119450, 941795], ['2005', 1576579, 440514, 993360, 930593], ['2006', 1600652, 434552, 1004163, 897127], ['2007', 1968113, 393032, 979198, 1080887], ['2008', 1901067, 517206, 916965, 1056036] ]); // Create and draw the visualization. new google.visualization.BarChart(document.getElementById('visualization')). draw(data, {title:"Yearly Coffee Consumption by Country", width:600, height:400, vAxis: {title: "Year"}, hAxis: {title: "Cups"}, isStacked: true} ); } </code></pre> <p>You might also be interested in a Stacked Area Chart, depending on what data you are trying to display.</p> <p>There is also a question which gives an example of a stacked bar chart using the Chart Tools Image API: <a href="https://stackoverflow.com/questions/5043236/bar-chart-in-javascript-stacked-bars-grouped-bars">Bar chart in Javascript: stacked bars + grouped bars</a></p> <p>Note that the Image Charts portion of Google Chart Tools was officially deprecated on the 20th April, 2012. Image charts will still work for a while as per Google's deprecation policy, but I recommend you concentrate on the interactive HTML5+SVG implementation described above.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload