hoverColumn graphael

Asked

Viewed 43 times

0

I’m using the library graphael.js to create a statistic chart. I want to display multiple charts on the same page with different values. My problem is in the hoverColumn, when I hover over the dots. For the first chart it works well, but for the second it appears values "undefined".

Example: http://jsfiddle.net/aNJxf/17/

1 answer

0

I think I figured out your problem... The problem lies in the arrays you are passing, do not have the same number of parameters.

On the second graph you have this:

var xVals2 = [[1, 2, 3, 4, 5, 6, 7],[3.5, 4.5, 5.5, 6.5, 7, 8]]; //data coube x1, courbe x2
var yVals2 = [[2, 10, 15, 5], [5, 9, 13, 15, 10 ]]; //data

in x you have two elements, the first with 7 positions and the second with 6 positions, in y you have two elements where the first has 4 positions and the second has 5 positions...

Trying to simplify more... in x the first element, must have the same number of positions as the first element in y.

I send you the arrays of the second graph:

var xVals2 = [[1, 2, 3, 4],[3.5, 4.5, 5.5, 6.5, 7]]; //data coube x1, courbe x2
var yVals2 = [[2, 10, 15, 5], [5, 9, 13, 15, 10 ]]; //data

Browser other questions tagged

You are not signed in. Login or sign up in order to post.