Please, help me debugging this one
FusionCharts Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Please, help me debugging this one Expand / Collapse
Author
Message
Posted 4/15/2008 9:42:30 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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.
Post #5667
Posted 4/16/2008 7:44:54 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme 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

Post #5683
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -7:00, Time now is 5:11pm


Execution: 0.063.