hi
i want draw multiple google bar chart in for loop .but draw only last graph
with value.Please help me
<%int countv=1;%>
var chart="";
var data="";
var options="";
<c:forEach var="entry1" items="${ytdGraphMap}">
<c:forEach var="hash1" items="${entry1['key']}">
google.charts.load('current', {packages:['corechart']});
google.charts.setOnLoadCallback(drawStuff);
function drawStuff() {
data= new google.visualization.DataTable();
data.addColumn('string', 'Country');
data.addColumn('number', 'GDP');
data.addRows([
['US', ${ytdGraphMap[hash1]}],
['China', ${ytdGraphMap[hash1]}],
['Japan', ${ytdGraphMap[hash1]}],
]);
options = {
title: 'GDP of selected countries, in US $millions',
width: 300,
height: 200,
legend: 'none',
bar: {groupWidth: '95%'},
vAxis: { gridlines: { count: 4 } }
};
chart = new
google.visualization.ColumnChart(document.getElementById('number_format_chart<%=countv%>'));
chart.draw(data, options);
};
<%countv++;%>
</c:forEach>
</c:forEach>
--
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-visualization-api/8d762449-9407-4473-b8f9-6f8d5bebd787%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.