JQuery Google Charting - display for example 5 charts
I have a problem with display for example 5 times the same charts on the '#charts' (code below):
$('#charts').gchart({
type: 'line',
maxValue: $.gchart.calculate,
minValue: $.gchart.calculate,
width: 600,
height: 200,
legend: 'right',
series: [ $.gchart.series('Median', [590, 591, 583, 592, 595], 'red'),
$.gchart.series('Max', [600, 610, 605, 607, 609], 'green'),
$.gchart.series('Min', [570, 575, 580, 582, 580], 'blue')
],
axes: [ $.gchart.axis('bottom', builds, 'black'),
$.gchart.axis('left', 0, 600, 'black','right'),
$.gchart.axis('right', 0, 800, 50, 'blue', 'left'),
],
markers: [$.gchart.marker('diamond', 'black', 0)]
});
when I try to do it like this(see below) - it doesn't work (will display only one chart)
for (var i = 0; i < 5; i++)
{
$('#charts').gchart({
type: 'line',
maxValue: $.gchart.calculate,
minValue: $.gchart.calculate,
width: 600,
height: 200,
legend: 'right',
series: [ $.gchart.series('Median', [590, 591, 583, 592, 595], 'red'),
$.gchart.series('Max', [600, 610, 605, 607, 609], 'green'),
$.gchart.series('Min', [570, 575, 580, 582, 580], 'blue')
],
axes: [ $.gchart.axis('bottom', builds, 'black'),
$.gchart.axis('left', 0, 600, 'black','right'),
$.gchart.axis('right', 0, 800, 50, 'blue', 'left'),
],
markers: [$.gchart.marker('diamond', 'black', 0)]
});
}
Anybody know how do this ? It should be some similar function like '.append()'