Firefox rendering problem
FusionCharts Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Firefox rendering problem Expand / Collapse
Author
Message
Posted 7/8/2008 7:17:41 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 7/9/2008 1:25:18 PM
Posts: 2, Visits: 2
Hi.

I'm using JSClass and Javascript to render some charts. I want to include a simple <select> with some options and then redraw the chart based upon the chosen option. I can get it to work in IE7 but not in Firefox. Firefox will not render the new chart based upon a different selection.

Has anyone else experienced this?

My markup looks like this:

<div id="picker">

<form name="chartPicker">

<select name="chartType">

<option value="kbymo">Contracts by Month</option>

<option value="kbyrep">Contracts by Sales Rep</option>

<option value="kbystage">Contracts by Stage</option>

</select>

<input type="button" value="Show Chart" onclick="buildChart('chart');"/>

</form>

</div>

<div id="chart"></div>

And my Javascript looks like this:

var myChart;

function buildChart(targetID){

var chartType = document.chartPicker.chartType.value;

myChart = new FusionCharts("../Flash/FCF_Pie3D.swf", targetID, "400", "300", "0", "1");

if (chartType == "kbymo"){

myChart.setDataURL("../Fragments/dbymo.xml");

}

else if (chartType == "kbyrep"){

myChart.setDataURL("../Fragments/dbyrep.xml");

}

else {

myChart.setDataURL("../Fragments/dbystage.xml");

}

myChart.render(targetID);

}

Post #7243
Posted 7/9/2008 1:02:01 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: 10/5/2008 9:41:33 AM
Posts: 809, Visits: 1,285
Hi,

Could you please try giving a different chart DOM id, other than the targetID?

NOTE : Chart id and target div id should be unique, distinct.

e.g.

  var myChart = new FusionCharts("../Flash/FCF_Pie3D.swf", targetID+"Id", "400", "300", "0", "1");
...
  myChart.render(targetID);
 

Regards,

Sudipto Choudhury
FusionCharts Team

Post #7246
Posted 7/9/2008 1:41:38 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 7/9/2008 1:25:18 PM
Posts: 2, Visits: 2
Thanks!

That did it. I missed that small little detail in the documentation.

Post #7260
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -7:00, Time now is 3:52pm


Execution: 0.063.