How to shade the area between two lines?
Moderators: Developers, Moderators
How to shade the area between two lines?
I am logging temperature data from an external sensor and supplying this information to Cacti via a custom SNMP OID. As a result I am obtaining a line which represents the current temperature. However from the RRD file that is generated,I can also find the minimum and maximum temperatures for a particular time period. This results in an extra two lines on my graph representing the minimum and maximum for a day or a week. What I would like to do is to shade the area between these two lines, thereby identifying clearly the range of temperatures for a particular day or week. I have not been able to find any mechanism that allows me to shade between two arbitrary lines, where negative numbers are involved. Does anyone know of any way of doing this such that only the area between the minimum and maximum lines is shaded?
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: How to shade the area between two lines?
For the minimum use a, then for the max use an area fill with the shade color that stacks on top of the line, use a CDEF to subtract max-min and then follow that up with a line at average and a line at max.
The real trick is the STACK and the CDEF.
The real trick is the STACK and the CDEF.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 1 guest