Differnet Chart on the same DIV

schwa226 -

Originally from ticket #80.

Hi!

I use jQuery Mobile and I have a mobile page with a div with the id="chartdiv".
On loading the page I create a amchart as AmSerialChart.
After adding all data the chart will be writen to the div.

This is working fine for the first time - the chart is shown correctly.

But if I visit the chart page again with different data it shows nothing. I think it will not work to write a different chart to same div, isn't?

So my idea was to write the chart only once to the div element.
If I have new data I remove all graphs from the chart and add the new data with new graphs.
The graphs are shown now but the left and right axis are moved outside like here in post #5:
http://www.amcharts.com/_forum/amcharts/viewtopic.php?id=10927

Any idea how to handle differnet charts on the same div?

Try to set chart.marginsUpdated = false before validating data.

Have more questions? Submit a request

Comments

  • Avatar
    Antanas Marcelionis

    Try to set chart.marginsUpdated = false before validating data.

Powered by Zendesk