vertical bands similar to background.hbars

Share RGraph:  

« 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 Balazs on 10th February 2014
Is there a way to highlight a range of the x-axis creating vertical bars similarly to how background.hbars create horizontal bars to highlight (a) range(s) on the y-axis? Thanks.
Posted by Richard on 10th February 2014
Hi there,

There's background.vbars on the Scatter chart - because there's an X scale there - but not on the Line chart. Primarily because there's no X scale with the Line chart.



Richard
Posted by Balazs on 11th February 2014
Thanks for the response - I'll look into it. After I posted the question I thought of doing a combination bar chart and line chart, making the bars run the entire y range, but that could be more cumbersome I guess.
Posted by Richard on 11th February 2014
Hi there,

You could also add a function to the onbeforedraw event that draws the bars - making use of the standard fillRect function.

The combined bar/line chart idea is novel - you'll want to turn the axes off so that they don't get written twice - and also the Bar charts background grid. Oh and render the Bar chart before the Scatter chart so that it appears at the back.


Richard

Add a reply




« Back to message list