Why does RGraph complain about negative values when I have more than 16 groups?

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by JTM on 23rd January 2017
I am using RGraph to make a stacked bar graph based on this example (www.rgraph.net/demos/svg-bar-100pc-stacked.html). When I have more than sixteen groups, I get this error:

Error: attribute width: A negative value is not valid. ("-0.882352941176471")

I have also tried increasing the number of groups with a similar graph (www.rgraph.net/demos/svg-bar-stacked2.html). With this one, I cannot have more than eight groups. Why is this happening? Could it be a limitation with RGraph?
Posted by Richard on 23rd January 2017
Hi there,

It probably means that you need to:

1. Increase the width of your <div>
2. Reduce the hmargin setting. If you do this then set it to 0 and then start increasing it gradually.


Add a reply

« Back to message list