PMSI-AlignAlytics / dimple

An object-oriented API for business analytics
Other
2.73k stars 557 forks source link

Dynamically change SVG with animation #191

Closed silent-tan closed 8 years ago

silent-tan commented 8 years ago

There is such a requirement what i need: To begin with, i had rendered the svg with some dataset, Then, i will take the ajax request to get a new dataset, so, the problem comes:

Can dimple.js dynamically change svg with the new dataset?

Such a dynamic changes including following:

  1. the axis
  2. the line(assuming that i paint the line on the svg);

tips: my english is poor, so if you don't understand what i said, take it easy.

andarilhoz commented 8 years ago

Yes, you could send the new data to your chart like

myChart = newData

and then you could re draw it

myChart.draw(1000) //  1000, in this case is the time of the animation.

i think this is what you are talking about, if not, leave a reply =)

silent-tan commented 8 years ago

@andarilhoz yes, thanks