1

Is there a way to make Google Sankey Chart to adjust it's height automatically?

I have a problem with height when I want to draw a lot of rows. Please check fiddle example, because there is a lot of rows, they cannot be all displayed, and the console is showing massive amount of errors like:

Error: Invalid negative value for <rect> attribute height="-20.76923076923077"

If i reduce number of rows, everything is fine. I want it to set height automatically depending of number of rows.

Here is the fiddle example: http://jsfiddle.net/p0hayw9x/19/

Anyone came across this before?

UPDATE:

I have found a workaround, basically multiplying number of rows times fixed value and setting this dynamically as height. Something like:

    var rowsQty = data.getNumberOfRows();
    var autoHeight = rowsQty*15;

But I don't feel that this is reliable solution.

zachu
  • 671
  • 2
  • 7
  • 19
  • adjusting the height according to # of rows seems fine, however you might want to set a min or max on that... – WhiteHat Feb 15 '16 at 17:43
  • There is another issue with this workaround, as each row can have different height depending on given weight.. – zachu Feb 15 '16 at 20:46

0 Answers0