hoverColumn graphael

0

I'm using the graphael.js library to create a statistics chart. I want to show multiple graphics on the same page with different values. My problem is in hoverColumn , when I hover over the dots. For the first graph works fine, but for the second graph appear " undefined " values.

Example: link

    
asked by anonymous 29.04.2015 / 11:10

1 answer

0

I think I have discovered your problem ... The problem is in the arrays that are passing, do not have the same number of parameters.

In the second graphic 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 one has 4 positions and the second one 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 chart:

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
    
04.05.2015 / 13:19