From 303188acd18b985c9bc622348579b812abb6251f 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@1949 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/doc/rrdgraph.pod | 8 ++++++++ program/src/rrd_graph.c | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/program/doc/rrdgraph.pod b/program/doc/rrdgraph.pod index f84bb761..9f0dcf40 100644 --- a/program/doc/rrdgraph.pod +++ b/program/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/program/src/rrd_graph.c b/program/src/rrd_graph.c index d1f32ddc..643abe42 100644 --- a/program/src/rrd_graph.c +++ b/program/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.30.2