jQWidgets Forums

jQuery UI Widgets Forums Chart Animation In Multiple Charts

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  GrantM 10 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Animation In Multiple Charts #53731

    GrantM
    Participant

    I have 4 charts loading on a click event.

    In Mozilla Firefox they seem to partially load 1 by 1 then complete the animation together once they have all partially loaded.

    In Chrome, nothing happens for 2 seconds then they all appear and load together.

    What I would really prefer is that each chart completed its animation before starting the next one. Is this possible?

    Animation In Multiple Charts #53739

    Peter Stoev
    Keymaster

    Hi GrantM,

    If that’s what you want to achieve then you may probably initialize each chart with some timeout i.e setTimeout with 2 seconds delay and call the initialization code for the second chart, 4 seconds for the third and so on.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Animation In Multiple Charts #58522

    GrantM
    Participant

    Do you have an example or demo with that in use please?

    Animation In Multiple Charts #58551

    GrantM
    Participant

    Its okay I found an example.

         
         // auto update timer
         var ttimer = setInterval(function () {
             var max = 800;
             for (var i = 0; i < data.length; i++) {
                 data[i].a = Math.max(100, (Math.random() * 1000) % max);
                 data[i].b = Math.max(100, (Math.random() * 1000) % max);
             }
    
             $('#chart').jqxChart('update');
         }, 3000);
    
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.