Controlling the number of background horizontal bars in the HBar


« 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

PLEASE READ:

If RGraph has helped you please give your feedback - thanks! You can give your feedback or leave a testimonial by adding a forum post or clicking on the speech bubble icon at the very top right.

But most of all: Please link to the RGraph website! (get information by clicking on the chain icon at the top right of the page)
Posted by John S on 5th June 2016
Perfect! Thanks.

Add a reply

 




« Back to message list
RGraph on social media