*solved:*
The code Worked after changing the code as:

var chart = new google.charts.Bar(document.getElementById('myChart')); 
*TO*
  var chart = new 
google.visualization.BarChart(document.getElementById('myChart'));

On Wednesday, September 16, 2015 at 4:46:23 PM UTC+5, Mohammad Hussain 
wrote:
>
> Hello,
>
>
> i have a problem with stacked bar Chart which is not working properly. the 
> bars are being displayed vertically and not-stacked also.
> Following is the code used(pasted form Example page) :
>
>
>
> google.load("visualization", "1.1", { packages: ["bar"] });
> google.load("visualization", "1", { packages: ["corechart"] });
>
>  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_stacked = {
>         isStacked: true,
>         height: 300,
>         legend: { position: 'top', maxLines: 3 },
>         hAxis: { minValue: 0 }
>     };
>
>     var chart = new google.charts.Bar(document.getElementById('myChart'));
>
>     chart.draw(data, options_stacked);
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/6eebe8e1-770a-4570-a824-96d5831c36cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to