|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 4/15/2008 3:59:27 PM
Posts: 1,
Visits: 5
|
|
Hi all
I have the need to render several XML files describing line charts in the same page.
chiefly, I wrote this routine, that should - at some point - generate this HTML:
[script type="text/javascript"]
var [?="chart$i"?] = new FusionCharts("Charts/FCF_MSLine.swf", "ChartId", "600", "350");
[?="chart$i"?].setDataURL("[?=$f?]");
[?="chart$i"?].render("chartdiv");
[/script] [/td]
where [ must be read as the less-than symbol and ] as the greater-than.
$i is a counter - used to serialize the javascript objects, and $f is the current XML file path.
Unfortunately, only the last graph is shown.
Can you please help me?
Thanks in advance.
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: Today @ 8:30:13 AM
Posts: 92,
Visits: 711
|
|
Hi gbiondo, In multiple FusionCharts, Render Charts need different <div> and different chart id. Please modify your code as per given code.<? for($i=1;$i<11;$i++){ ?> <div id="<?="chart$i"?>div"></div> <script type="text/javascript"> var <?="chart$i"?> = new FusionCharts("Charts/FCF_MSLine.swf", "<?="chart$i"?>", "600", "350"); <?="chart$i"?>.setDataURL("<?=$f?>"); <?="chart$i"?>.render("<?="chart$i"?>div"); </script> <? } ?>
Thanks, Arindam FusionCharts Team www.fusioncharts.com
|
|
|
|