From e93e7c0658f76edf7cf83dca3cd076df97f5d655 Mon Sep 17 00:00:00 2001 From: oetiker Date: Tue, 27 Oct 2009 13:13:37 +0000 Subject: [PATCH] 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 --- doc/rrdgraph.pod | 8 ++++++++ src/rrd_graph.c | 10 ++++++++++ 2 files changed, 18 insertions(+) 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, -- 2.11.0