[rrd-developers] Optional change in graph behavior: --full-size-mode patch (sorry about the "No topic" last week)

Matthew Chambers matthew.chambers at vanderbilt.edu
Mon May 14 19:55:08 CEST 2007

I have made changes to the development version of rrdtool’s graph mode that
introduces a “--full-size-mode” option which, when enabled, will cause the
-width and -height parameters to specify the actual size of the output
image.  The main graph area is automatically adjusted based on the space
necessary for the legend, border spacing, graph title, axis labels, and the
y axis name (and also the pie chart, but does anybody use that?).  Without
--full-size-mode, the -width and -height parameters control the main graph
area’s dimensions as usual.  To do this, I copied a large part of the
graph_location() function and modified it, wrapping the new and the old code
with if/else of the full-size-mode option.  I had to make graph_init() call
graph_location() before data_proc() because the latter function precomputes
the data points which wouldn’t be correct if the graph area was changed
after that.  The --only-graph option should still work as well.  I’ve
updated the documentation and contributors to reflect the new option (but I
couldn’t find the “CHANGES” file).  I made another change in
--full-size-mode that won’t apply to the other modes: if the graph title is
too big to fit within the specified x space, it will be reduced by 1 point
and retested (down to a minimum of size 4) until it does fit.

-Matt Chambers

SVN diff attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rrdtool-1.2-branch-full-size-mode-diff.zip
Type: application/octet-stream
Size: 9453 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/rrd-developers/attachments/20070514/45164230/attachment-0001.obj 

More information about the rrd-developers mailing list