Controlling the number of background horizontal bars in the HBar

Share RGraph:   Share or Like RGraph on Facebook!

« 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 John S on 5th June 2016
Hi Richard,

I'm using backgroundBarcolor1 and backgroundBarcolor2 to create alternating background colors for a horizontal bar chart.

The issue is that each background color spans across 6 bars/items. So, with a chart that has 30 horizontal bars, there are only 5 rows of alternating background colors.

How do I set the background to alternate for each row?

Thanks,

--John
Posted by Richard on 5th June 2016
Hi,

You can use the ylabelsCount option (which in the HBar chart doesn't do anything IIRC). There's an example here:

www.rgraph.net/fiddle/view.html/hbar-alternating-colors-example






Richard
Posted by John S on 5th June 2016
Perfect! Thanks.

Add a reply




« Back to message list