From: oetiker Date: Tue, 27 Oct 2009 13:13:37 +0000 (+0000) Subject: allow the grid on:off pattern to be configured X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=commitdiff_plain;h=e93e7c0658f76edf7cf83dca3cd076df97f5d655 allow the grid on:off pattern to be configured git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1949 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/doc/rrdgraph.pod b/doc/rrdgraph.pod index f84bb76..9f0dcf4 100644 --- a/doc/rrdgraph.pod +++ b/doc/rrdgraph.pod @@ -336,6 +336,14 @@ multiple defaults. A green arrow is made by: C<--color ARROW#00FF00> +[B<--grid-dash> IB<:>I] + +by default the grid is drawn in a 1 on, 1 off pattern. With this option you can set this yourself + + --grid-dash 1:3 for a dot grid + + --grid-dash 1:0 for uninterrupted grid lines + [B<--border> I]] Width in pixels for the 3d border drawn around the image. Default 2, 0 diff --git a/src/rrd_graph.c b/src/rrd_graph.c index d1f32dd..643abe4 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -4178,6 +4178,7 @@ void rrd_graph_options( { "legend-position", required_argument, 0, 1005}, { "legend-direction", required_argument, 0, 1006}, { "border", required_argument, 0, 1007}, + { "grid-dash", required_argument, 0, 1008}, { 0, 0, 0, 0} }; /* *INDENT-ON* */ @@ -4359,6 +4360,15 @@ void rrd_graph_options( case 1007: im->draw_3d_border = atoi(optarg); break; + case 1008: /* grid-dash */ + if(sscanf(optarg, + "%lf:%lf", + &im->grid_dash_on, + &im->grid_dash_off) != 2) { + rrd_set_error("expected grid-dash format float:float"); + return; + } + break; case 1002: /* right y axis */ if(sscanf(optarg,