]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commit
Improve auto-scaling of gridlines and placement of x-labels when
authorMaksym Sobolyev <sobomax@sippysoft.com>
Thu, 29 Jan 2015 22:29:57 +0000 (14:29 -0800)
committerMaksym Sobolyev <sobomax@sippysoft.com>
Thu, 29 Jan 2015 22:29:57 +0000 (14:29 -0800)
commit5d9cb4610661dffba310e562c85bc4987aeca081
tree6a110de26e5708f915e581f873a6b2a8508cea11
parent6b3face4f252cfb91f9e2fba1038ac880ee07e32
Improve auto-scaling of gridlines and placement of x-labels when
plotted_time/pixel ratio gets smaller than 2. This significantly
improves readability of small graphs (i.e. around 400-pixels wide)
when time range plotted becomes less than 600 seconds. Before
this change you would only get few gridlines and from 1-2 to 0
labels depending on how lucky are you. Some examples of such
graphs can be found here. "o" vs. "n" prefix denotes behaviour
before and after the change respectively, and number after that
denotes full scale of x axis in seconds:

Before:

 http://sobomax.sippysoft.com/rrdtool/o660.png
 http://sobomax.sippysoft.com/rrdtool/o600.png
 http://sobomax.sippysoft.com/rrdtool/o540.png
 http://sobomax.sippysoft.com/rrdtool/o480.png
 http://sobomax.sippysoft.com/rrdtool/o420.png
 http://sobomax.sippysoft.com/rrdtool/o360.png
 http://sobomax.sippysoft.com/rrdtool/o300.png
 http://sobomax.sippysoft.com/rrdtool/o240.png
 http://sobomax.sippysoft.com/rrdtool/o180.png
 http://sobomax.sippysoft.com/rrdtool/o120.png

After:

 http://sobomax.sippysoft.com/rrdtool/n660.png
 http://sobomax.sippysoft.com/rrdtool/n600.png
 http://sobomax.sippysoft.com/rrdtool/n540.png
 http://sobomax.sippysoft.com/rrdtool/n480.png
 http://sobomax.sippysoft.com/rrdtool/n420.png
 http://sobomax.sippysoft.com/rrdtool/n360.png
 http://sobomax.sippysoft.com/rrdtool/n300.png
 http://sobomax.sippysoft.com/rrdtool/n240.png
 http://sobomax.sippysoft.com/rrdtool/n180.png
 http://sobomax.sippysoft.com/rrdtool/n120.png
src/rrd_graph.c
src/rrd_graph.h
src/rrd_xport.c