Color between two or more lines

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 Matze on 13th December 2013
is there a possibility, to ink the are between two or more lines?
E.g. I try to draw a chart for the temperature. Every hour gets a tick on the x-axis. The average is not such interesting, so I want to draw the maximum and the minimum with two lines in one Chart.
How can I ink the area between these two lines?

In addition, I want to add the wind chill. There is also a maximum and a minimum. These two lines should be also in the one chart. The area between these two lines should be also inked (in another color).
How is this possible?

Thanks for your help!
Posted by RGraph support on 13th December 2013
Hi there,

Sounds very much like you want a filled range chart. Here are some examples:

Richard, RGraph Support
Please link to the RGraph website. Thanks!
Posted by Matze on 14th December 2013
I've found a solution:

.Set('fillstyle', ['rgba(255,0,0,1.0)', 'rgba(255,255,255,1.0)'])
.Set('filled', true)
.Set('filled.accumulative', false)

The only problem ist, that the grid isn't visible anymore beneath the line, which is filled white.
But if the second is filled clear (e.g. rgba(255,255,255,0.0)) the filling of the first line is visible...

Add a reply

« Back to message list