allow the grid on:off pattern to be configured
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Tue, 27 Oct 2009 13:13:37 +0000 (13:13 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Tue, 27 Oct 2009 13:13:37 +0000 (13:13 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1949 a5681a0c-68f1-0310-ab6d-d61299d08faa

doc/rrdgraph.pod
src/rrd_graph.c

index f84bb76..9f0dcf4 100644 (file)
@@ -336,6 +336,14 @@ multiple defaults.
 
 A green arrow is made by: C<--color ARROW#00FF00>
 
 
 A green arrow is made by: C<--color ARROW#00FF00>
 
+[B<--grid-dash> I<on>B<:>I<off>]
+
+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>]]
 
 Width in pixels for the 3d border drawn around the image. Default 2, 0
 [B<--border> I<width>]]
 
 Width in pixels for the 3d border drawn around the image. Default 2, 0
index d1f32dd..643abe4 100644 (file)
@@ -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},
         { "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* */
         {  0, 0, 0, 0}
 };
 /* *INDENT-ON* */
@@ -4359,6 +4360,15 @@ void rrd_graph_options(
         case 1007:
             im->draw_3d_border = atoi(optarg);
             break;
         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,
         case 1002: /* right y axis */
 
             if(sscanf(optarg,