Example of a vertical range Bar chart

Share RGraph:   To help my Google visibility (it can't get much worse!), if you like and use RGraph I'd appreciate it if you could link to me

« 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 MJHanagan on 25th February 2016
Hi - I am looking for an example of a vertical bar chart to display daily high and low temperatures. A range chart with temperature on the Y-axis and the date on the X-axis would be a very easy way of looking at historical daily temperatures. Ideally I would also like to see the high and low temperature values displayed above and below each range bar.

The rgraph website says you have range bar chart capabilities but I did not see any examples of how this is done. Can you post a quick example?
Posted by Richard on 25th February 2016
Hi,

To do this I think you'd be better off with the Scatter chart and the boxplot like this:

www.rgraph.net/fiddle/view.html/a-scatter-chart-showing-a-boxplot

There are limitations though (and its by no means as simple as a configuration option). To get rid of the stroke you'll need to modify the source and set the color to transparent. Add this on line 1658 (just before the strokeRect() call):

co.strokeStyle = 'rgba(0,0,0,0)';

For the text you'll need to use the obj.coords array and the API, like in the example.





Richard

Add a reply




« Back to message list