AnyChart / AnyChart-Ember

AnyChart Component for Ember CLI provides an easy way to use AnyChart JavaScript Charts with Ember Framework.
https://www.anychart.com/
Apache License 2.0
12 stars 0 forks source link

How is it possible to redraw the chart in Ember? #2

Open wonderful123 opened 6 years ago

wonderful123 commented 6 years ago

I have tried all manner of redrawing functions. The only thing I can get to working is to make a toggle that hides and reshows a component.

I want to update the data and redraw. I can't seem to get this to work.

The javascript examples don't translate directly to the ember implementation it seems.

I've tried code like this: let stage = anychart.graphics.create(); this.chart.container(stage); this.chart.draw();

I've been able to use removeAllSeries() but what if I wanted to change a label or something?

Shestac92 commented 6 years ago

@wonderful123 The chart calls redraw function automatically when something in appearance is changed. All you need is to change any visual setting or set new data. Here you can find a pure JS sample of adding a new point and changing chart label text Absolutely the same approach you can use in the integration.