PDA

View Full Version : updating pie chart



rans
30 Oct 2012, 12:52 AM
hi.
I am building an app with pie charts. when i click on of the fields (in chart 1)i am loading a new data to the chart with the commend
storeIng.load({url: serverAddress + item.storeItem.get('name') + ".json"}); (load chart 2)
Moreover i add a back button (from chart 2) to get back to the previous chart (to chart 1) with the same commend above.
When I get to the previous chart (chart 1) I still see some of the field of the chart 2.
Do you have any idea how I should fix it?
thanks

James Goddard
30 Oct 2012, 6:07 AM
Is this with chrome? Chrome has a bug in the SVG engine that leaves ghost sprites around. I haven't found a way around it.

rans
30 Oct 2012, 7:04 AM
Yes I am using chrome.
but my explorer can't open my app. because those errors in my html main file
Error: Invalid value for <rect> attribute y="NaN"
Error: Invalid value for <rect> attribute height="NaN"
Error: Invalid value for <rect> attribute y="NaN"
Error: Invalid value for <rect> attribute height="NaN"

any way those are screen shot from my app
first chart - I click on europe
39690
and now i update the chart data to europe countries39691

now after i click the back button i update the chart data, but you can still see the the spain field
is that what you mean?
thanks

James Goddard
30 Oct 2012, 7:29 AM
The best way to determine if you are running into the chrome bug or something else is to inspect the DOM. If the "ghost" element is on the screen but not in the DOM, then you have run into the chrome bug. If it is still in the DOM then there is something else going on.