Draw an area in a graph between two variables without stack.
Moderators: Developers, Moderators
-
- Posts: 20
- Joined: Wed Feb 01, 2023 5:27 am
Draw an area in a graph between two variables without stack.
I started using Cacti a few weeks ago. There is something I want to do, but I cannot find how to do it. If I missed something in the documentation, I would like a pointer.
I want to create a graph for a temperature. I want a line for the average temperature and I want to color the area between the minimum and maximum temperature. In order to draw this area, I cannot stack the maximum temperature on the minimum temperature, because their values would be added for the upper boundary of the area. I assume that I first have to subtract the minimum from the maximum and than stack that difference on the minimum using AREA:STACK. But how does one perform such a subtraction?
I want to create a graph for a temperature. I want a line for the average temperature and I want to color the area between the minimum and maximum temperature. In order to draw this area, I cannot stack the maximum temperature on the minimum temperature, because their values would be added for the upper boundary of the area. I assume that I first have to subtract the minimum from the maximum and than stack that difference on the minimum using AREA:STACK. But how does one perform such a subtraction?
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Draw an area in a graph between two variables without stack.
Using a CDEF. You have to perform some light magic. To determine the DEF names as Cacti controls those, but that's what you do.
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?
-
- Posts: 20
- Joined: Wed Feb 01, 2023 5:27 am
Re: Draw an area in a graph between two variables without stack.
Where do I start to find those DEF names?TheWitness wrote: ↑Sat Feb 04, 2023 9:09 am Using a CDEF. You have to perform some light magic. To determine the DEF names as Cacti controls those, but that's what you do.
-
- Posts: 20
- Joined: Wed Feb 01, 2023 5:27 am
Re: Draw an area in a graph between two variables without stack.
I think I found it already.FredZwarts wrote: ↑Sat Feb 04, 2023 10:01 amWhere do I start to find those DEF names?TheWitness wrote: ↑Sat Feb 04, 2023 9:09 am Using a CDEF. You have to perform some light magic. To determine the DEF names as Cacti controls those, but that's what you do.
-
- Posts: 20
- Joined: Wed Feb 01, 2023 5:27 am
Re: Draw an area in a graph between two variables without stack.
It does not work. It tried 'cdef=CURRENT_DATA_SOURCE,CURRENT_DS_MINIMUM_VALUE,-',TheWitness wrote: ↑Sat Feb 04, 2023 9:09 am Using a CDEF. You have to perform some light magic. To determine the DEF names as Cacti controls those, but that's what you do.
but then the graph shows "ERROR: don't understand 'U,-'".
I also tried 'cdef=CURRENT_DS_MAXIMUM_VALUE,CURRENT_DS_MINIMUM_VALUE,-',
but then the graph shows "ERROR: don't understand 'U,U,-'".
Without the CDEF the graph is displayed without error; the maximum is stacked on the minimum, but then the upper boundary is much too high.
Apparently the CURRENT_DS_MAXIMUM_VALUE and CURRENT_DS_MINIMUM_VALUE are incorrect, but I have no idea what it should be.
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Draw an area in a graph between two variables without stack.
I would not use the magic, but instead vnames start with a, b, c, ... Use those instead. Look at the Advanced Ping Graph template for some clues.
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?
-
- Posts: 20
- Joined: Wed Feb 01, 2023 5:27 am
Re: Draw an area in a graph between two variables without stack.
Thanks! I think I have it working now.TheWitness wrote: ↑Sat Feb 04, 2023 9:58 pm I would not use the magic, but instead vnames start with a, b, c, ... Use those instead. Look at the Advanced Ping Graph template for some clues.
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Draw an area in a graph between two variables without stack.
Great.
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 3 guests