graphite-graph-php icon indicating copy to clipboard operation
graphite-graph-php copied to clipboard

Figure out how to draw in+out stacked graphs

Open bd808 opened this issue 13 years ago • 2 comments

We draw graphs in cacti where io in and io out are shown in the same graph with two area series: from 0 -> input and from 0 -> -output.

scale(series,-1) will flip the output data points, but drawing the two as stacked doesn't do what I want. Both areas start from yMin instead of from 0.

areaBetween() sounds promising, but so far I haven't been able to make it work like my brain expects.

Read through the renderer source in Graphite and see if what I want is possible. If it is document it. If it's not make a patch!

bd808 avatar Mar 29 '12 21:03 bd808

areaBetween takes one argument which must be a seriesList with exactly 2 series. The first in the list is called lower and the second is upper. Lower is given the option invisible which sets the alpha of the series color to 0.

upper.pathExpression must exist, so if you're using a constantLine() you'll have to wrap it in something like movingAverage() to fake that.

bd808 avatar Mar 30 '12 01:03 bd808

Got it working fine for "up" series, but no luck yet for an inverted (scale(-1)) series.

bd808 avatar Mar 30 '12 01:03 bd808