Animation not working correctly

139 views
Skip to first unread message

API Developer

unread,
Jul 26, 2012, 5:29:40 PM7/26/12
to google-visua...@googlegroups.com
Hi,

I'm trying to add an animation to my charts when I insert data into the middle of the DataTable. Currently I've made a couple prototypes that work, but I can't seem to get the full program to work. I think my problem revolves around the fact that I'm waiting for a response of more data to replace the entire dataset with while I'm trying to do the animation and JavaScript is uni-threaded. Would this be a legitimate problem?

Also, it seems that my animation just goes extremely fast, although I place in 2000 under the duration it takes a couple milliseconds. Has anyone had any problems with the animation working that seem similar? And what have you done to correct it?

Thanks for any help!

asgallant

unread,
Jul 26, 2012, 5:56:33 PM7/26/12
to google-visua...@googlegroups.com
Yes, js is technically single-threaded (in all browsers except Chrome), but it behaves similar to a multithreaded language when asynchronous processes (AJAX, event listeners, timeouts) are used.  You could be having a problem, though, if you are handling the asynchronous processes wrong.  If you post your code or a link to the page, I can take a look and see.

As far as the animation duration goes, I tested a bunch of cases, and the only time things went awry was when I tried to use an unsupported animation.

API Developer

unread,
Jul 30, 2012, 8:06:54 PM7/30/12
to google-visua...@googlegroups.com
I can't really post my my code, but I made a prototype version of it that was able to work as a separate program from the entire project. I inserted it inside the program and it had the same problem, so I think it's deep-rooted in my environment.

Jeff, what did you end up doing to fix your problem?

On Friday, July 27, 2012 8:13:44 PM UTC-4, Jeff Bolton wrote:
Sorry, I got it working now....
Reply all
Reply to author
Forward
0 new messages