cacti icon indicating copy to clipboard operation
cacti copied to clipboard

The "Gradient Support" option does not work correctly on aggregate graphs

Open ISekan opened this issue 2 years ago • 12 comments

Cacti 1.2.24 It works properly only for first item. Is this a bug or a feature? image image

ISekan avatar Mar 10 '23 05:03 ISekan

I looked at making it work with AREA:STACK and it did not look good. So, I reverted it. It's an open issue though.

TheWitness avatar Mar 10 '23 13:03 TheWitness

It's more of a technical issue as the method that the contributor used basically renders several quadrants over one another with varying colors. Each area renders from the bottom of the Y-Axis upto the path. So, the final gradient becomes all washed out, and it also does not work well with AREA's on top of AREA's due to the fact the design does not allow for Alpha Transparency. It's all technical, might be able to be fixed, but it was beyond the 1.2.x scope. Maybe we can do something in 1.3.x.

TheWitness avatar Mar 10 '23 14:03 TheWitness

Can you test out this rrd.php file ? replace the original lib/rrd.php with it, make a backup first.

It should suport Stack and Aggregate graphs. Some graphs seem to have very light lines in them (mainly seen when using red with transparency)

This is for testing purposes, please make screenshots of any issues you are seeing. It uses a light theme, so gradient is going to a lighter color.

lib_rrd_1.2.24.zip

thurban avatar Apr 03 '23 08:04 thurban

To be clear for going forward:

  • Gradient support will be per graph template instead of global
  • Support for a light/dark mode (color going to a lightened or darkened version)
  • Changes will be in 1.3.x only

thurban avatar Apr 03 '23 08:04 thurban

thurban of course It works, but need to some adjustment

image image image image

ISekan avatar Apr 03 '23 10:04 ISekan

Yeah. Unfortunaltey this seems to be a rrdtool bug. If you disable "slopemode" on the graphs, it looks better, but rrdtool seems to slightly overlap the different areas, resulting in these lines. It doesn't show when no transparency is being used as it is a solid color then.

I'm looking into finding a fix for that, but it's going to take a while.

thurban avatar Apr 03 '23 13:04 thurban

@ISekan It looks like the version breaks the "Thumbnails". Can you confirm ? -> Seems like this only occurrs under very specific conditions ( very short time range )

thurban avatar Apr 04 '23 05:04 thurban

@ISekan you do not happen to have the possibility to compile rrdtool yourself ?

thurban avatar Apr 04 '23 07:04 thurban

Opened a bug report with rrdtool: https://github.com/oetiker/rrdtool-1.x/issues/1219

thurban avatar Apr 04 '23 08:04 thurban

you do not happen to have the possibility to compile rrdtool yourself ? Unfortunately not I have ver. RRD 1.7.1 on the cacti server

ISekan avatar Apr 04 '23 09:04 ISekan

Seems like this only occurrs under very specific conditions ( very short time range ) poller time is 1min If time preset is set 12h - all's ok, After switch to 1 day or more it is look no so good as you can see below image image

ISekan avatar Apr 06 '23 07:04 ISekan

Hi,

Not sure, but I don't see any gradient there, do I miss something ?

thurban avatar Apr 06 '23 07:04 thurban

@thurban,

Read this. Are you a taker on the change?

AREA:value[#color[#color2]][:[legend][:STACK][:skipscale][:gradheight=y]

See LINE, however the area between the x-axis and the line will be filled.

If color2 is specified, the area will be filled with a gradient.

The gradheight parameter can create three different behaviors. 
If gradheight > 0, then the gradient is a fixed height, 
starting at the line going down. 

If gradheight < 0, then the gradient starts at a fixed height above the x-axis, 
going down to the x-axis. If height == 0, then the gradient goes from the 
line to x-axis.

The default value for gradheight is 50.

TheWitness avatar Dec 02 '24 00:12 TheWitness

That did not take that long. Requires QA... I might change the wording a bit. Should we dump the previous Gradient support?

image

image

TheWitness avatar Dec 02 '24 02:12 TheWitness

Fixed in #5212. Updating the ChangeLog shortly.

TheWitness avatar Dec 02 '24 03:12 TheWitness

Example from a Graph Template with 4 CPU's using Totaling.

image

TheWitness avatar Dec 02 '24 03:12 TheWitness