no animation when using chart and datacollection ?

edited August 2019 in Technical questions

Hello !

Do you think it's possible to keep animation when a chart is synced with a datacollection ?


  • I found this hack using onAfterAdd/onAfterDelete

    Is there a cleanest way ?

  • oups !

    When i want to have a very smooth animation (i.e animateDuration = 1000), the CPU of chrome/firefox take +20%

    Wondering if i'll not have to use an external chart librarie

  • Alternative here : , but same thing, eating 20% CPU !

  • edited August 2019

    Hey @franck34, the workaround you've provided seems to be the only way around this. The reason why the animation doesn't get triggered in the first place, is because it gets triggered upon the execution of the add method. Meanwhile sync passes the data straight into the DataStore's pull object, without calling methods like add/remove/updateItem.

    However, I'd still like to suggest a small adjustment, instead of using two separate event, you can listen for a onStoreUpdated event of your collection's DataStore and look for the needed operations (add, delete in this case):

    Unfortunately, I can't really provide any solution to optimize this workaround further. It seems that either way, this is a rather intense task hence why the CPU usage is so high.

  • Thank you Dzmitry. I already make the adjustement you suggest, it's ok.

    For the optimization, honnestly, i browsed a few canvas (realtime) libs, it's always the same result: more it's smooth, more it eat CPU so it's not webix side.

    I'll stay with 200/400/600 animationDuration so the CPU is < 10%

    Thank you

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!