Xhynk
Xhynk

Reputation: 13870

Multiple Raphael.js/eve.js charts on the same page

I seem to have gotten it to work, kind of. But I can't get both numbers to increment, only the second one does (or the first one if there is no second).

I'd like both "XX%" numbers to animate, but can't figure out what I've done wrong

Here's the relevant fiddle showing what I have, that are using elements like this

<div id="canvas"> </div>

<div id="canvas2"> </div>

EDIT: forgot to mention that the numbers aren't quite right with 2 charts on a page

Upvotes: 0

Views: 211

Answers (1)

thriqon
thriqon

Reputation: 2488

Your onAnimate function exists twice... Rename one of them (or both), and everything works fine :)

http://jsfiddle.net/GGSpX/1/

Upvotes: 1

Related Questions