Sign in to follow this  
solkatten

Angular Gauge doesn't update when clicking on new link

Recommended Posts

I have a meny where different charts are showns. Fushioncharts works fine bur FushionWidgets Angular Gauge doesn't.

When open a browser and clicking on a menu the right chart and gauge is shown.

When clicking on another menu the right chart is shown, but the same gauge even when everything else on the page is correct updated and the .xml file with the data is updated as well.

I use Codeignitor, PHP and the free version of Fusionchart and Fushionwidget.

What is wrong?

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

Could you please confirm the following :-

1) The DIV IDs for all the charts that you are using are unique?

Ref.- <div id="chartdiv" align="center">The chart will appear within this DIV. This text will be replaced by the chart.</div>

2) The Chart IDs for all the charts that you are using are unique?

Ref.- var myChart = new FusionCharts("../FusionCharts/Column3D.swf", "myChartId", "900", "300", "0", "0");

3) The Chart variable name for all the charts that you are using are unique?

Ref.- var myChart = new FusionCharts("../FusionCharts/Column3D.swf", "myChartId", "900", "300", "0", "0");

Awaiting your reply.

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

Could you please send us the sample code that you are using to render the chart as an attachment?

Awaiting your reply.

Share this post


Link to post
Share on other sites

This is in the view .php file:

  <div id="chartdiv" align="center">

  The chart will appear within this DIV. This text will be replaced by the chart.

</div>

<script type="text/javascript">

var myChart = new FusionCharts("http://xxx.xxx.x.xx/Maingate/FusionWidgets/Charts/AngularGauge.swf", "myChartId", "200", "100", "0", "0");

myChart.setDataURL("http://xxx.xxx.x.xx/Maingate/Data.xml");

myChart.render("chartdiv");

  </script>

And it is used whenever I want an angular gauge.

Edited by Guest

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

In case the data for the widgets that you are rendering get cached by the browser, it would render the Widgets with the old datavalue instead of the updated one.

In order to check this you need to use cache controllers.

One of the way to use a cache controller is to pass an unique value like 'timestamp' along with the declaration of the URL for the XML file(dataURL method) that you are using to render the chart.

Hope this helps. :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this