[rrd-users] How to generate nicely formatted columns in the legend graph?
Simon Hobson
linux at thehobsons.co.uk
Sat Apr 15 11:24:41 CEST 2017
K. de Jong <keesdejong+bugs at gmail.com> wrote:
> Quick question, how can I create nice columns that won't mess up the layout if numbers increment or decrements? Something like this: http://martybugs.net/linux/rrdtool/images/traffic_detail.png
>
> I'm not trying stuff like here below, but it doesn't handle changing values, the columns shift position then...
As you've found out ... it's tricky sometimes.
Make sure that your labels are all the same length - so pad out "User" and "System" so they are the same length as "User (nice)". Then make sure that all your value formats are of sufficient length that all values you might see will fit in the given size of display format. Between them, I find that these will line up the columns nicely, except ...
The biggest problem I find is getting the column headers to line up. I end up using trial and error to get the column headers "near enough" as no matter what I do, I have never managed to get them to line up exactly - as there's no label (like there is for the data lines), that throws the origin of the text off and the rest goes off as well.
More information about the rrd-users
mailing list