Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
Updating igDoughnutChart in real time
posted

Hi,

The documenation states that I should be able to use 'notifySetItem' to update the chart whenver my data source is updated. However, I'm getting an error stating that 'notifySetItem' is not a method on igDoughnutChart.

I've done some experimentation with the other methods (updateSeries, addSeries, and removeSeries) and I'm seeing some inconsistent behavior that I hope someone can help sort out.

After updating an item in my collection, I'm able to use updateSeries to refresh the chart. However, newly inserted data doesn't show up. I managed to get inserted data to display in the chart by calling removeSeries followed by addSeries. It works, but is not ideal.

Here are the examples on jsFiddle:

Example 1 binds an array and has a button to update and add an new element to the array. It uses 'udpateSeries'. Notice how the newly added item doesn't show up.

http://jsfiddle.net/guraylp3/c5oo7uwv/

Example 2 does the same thing as Example 1 but calls 'removeSeries' and 'addSeries'. Notice how the newly added item shows up.

http://jsfiddle.net/guraylp3/68sqkzzc/

Thanks in advance for your help,

-Lee