summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e41545a)
raw | patch | inline | side by side (parent: e41545a)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 14 Feb 2007 06:53:01 +0000 (06:53 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 14 Feb 2007 06:53:01 +0000 (06:53 +0000) |
program/doc/rrdgraph.pod | patch | blob | history | |
program/src/rrd_graph.c | patch | blob | history | |
program/src/rrd_graph.h | patch | blob | history |
index b7bf370608c37488ea60891d5f7e1a011744d17b..59d3ac4ad65910b62e2519ae6abecacc451d0c87 100644 (file)
--- a/program/doc/rrdgraph.pod
+++ b/program/doc/rrdgraph.pod
suppress the grid and labels altogether. The default for this option is
to automatically select sensible values.
+If you have set --y-grid to 'none' not only the labels get supressed, also
+the space reserved for the labels is removed. You can still add space
+manually if you use the --units-length command to explicitly reserve space.
+
[B<-Y>|B<--alt-y-grid>]
Place the Y grid dynamically based on the graph's Y range. The algorithm
index 9be24e8aaba270e273b746c936deb88251ab016e..5a54c3dfe9d0dc13134e948dd4b78b891808944f 100644 (file)
--- a/program/src/rrd_graph.c
+++ b/program/src/rrd_graph.c
if (im->draw_x_grid) {
Yxlabel=im->text_prop[TEXT_PROP_AXIS].size *2.5;
}
- if (im->draw_y_grid) {
+ if (im->draw_y_grid || im->forceleftspace ) {
Xylabel=gfx_get_text_width(im->canvas, 0,
im->text_prop[TEXT_PROP_AXIS].font,
im->text_prop[TEXT_PROP_AXIS].size,
im->maxval = DNAN;
im->unitsexponent= 9999;
im->unitslength= 6;
+ im->forceleftspace = 0;
im->symbol = ' ';
im->viewfactor = 1.0;
im->extra_flags= 0;
break;
case 'L':
im->unitslength = atoi(optarg);
+ im->forceleftspace = 1;
break;
case 'T':
im->tabwidth = atof(optarg);
index 6ed66d2f4327a9e89e1ede3b63fc87e46117b9f2..2e8e3bc341f85cdd6c4c20d048b235338912a4f7 100644 (file)
--- a/program/src/rrd_graph.h
+++ b/program/src/rrd_graph.h
#endif
long ximg,yimg; /* total size of the image */
double magfact; /* numerical magnitude*/
- long base; /* 1000 or 1024 depending on what we graph */
+ long base; /* 1000 or 1024 depending on what we graph */
char symbol; /* magnitude symbol for y-axis */
float viewfactor; /* how should the numbers on the y-axis be scaled for viewing ? */
- int unitsexponent; /* 10*exponent for units on y-asis */
+ int unitsexponent; /* 10*exponent for units on y-asis */
int unitslength; /* width of the yaxis labels */
+ int forceleftspace; /* do not kill the space to the left of the y-axis if there is no grid */
+
int extra_flags; /* flags for boolean options */
/* data elements */