summaryrefslogtreecommitdiffabout
path: root/src/tagr.h
authorSergey Poznyakoff <gray@gnu.org.ua>2009-05-30 09:57:16 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2009-05-30 09:57:16 (GMT)
commit2a6ef4f51500091e535b2b47d709eee5cd52468c (patch) (side-by-side diff)
treee3e28622c41b8b477acf1f2be6db9955b7ab4c6b /src/tagr.h
parentfbc8bdac6efb0c63a73c5105bbf4ecb304187e44 (diff)
downloadtagr-2a6ef4f51500091e535b2b47d709eee5cd52468c.tar.gz
tagr-2a6ef4f51500091e535b2b47d709eee5cd52468c.tar.bz2
Adjust vertical axis as needed.HEADmaster
* src/graph.c (default_monitor): New global. (find_max): New function. (draw_graph): Adjust max rate if requested. * src/grid.c (ygrid_create): Use mon->ystep_absolute to determine the type of grid. * src/readconfig.c (cb_monitor): Handle `monitor default'. (monitor_kw): New statements: max-adjust and y-step-absolute. (tagr_kw): Remove rate-units kw. * src/tagr.h (struct monitor): New members: max_adjust and ystep_absolute. (default_monitor): New extern.
Diffstat (limited to 'src/tagr.h') (more/less context) (ignore whitespace changes)
-rw-r--r--src/tagr.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/tagr.h b/src/tagr.h
index 5d7c3e0..6ed7ca2 100644
--- a/src/tagr.h
+++ b/src/tagr.h
@@ -43,14 +43,16 @@
struct monitor
{
- char *id;
- char *name;
- char *dir;
- char *rate_unit;
- unsigned long max_rate;
- double scale;
- double ystep;
- int swap;
+ char *id; /* Monitor ID */
+ char *name; /* Full name */
+ char *dir; /* Output directory */
+ char *rate_unit; /* Rate units */
+ unsigned long max_rate; /* Max. rate value */
+ unsigned long max_adjust; /* Adjustment for max. rate */
+ double scale; /* Y (rate) scale */
+ double ystep; /* Step of Y grid, in fractions of max_rate */
+ int ystep_absolute; /* When true, ystep is an absolute value */
+ int swap; /* Swap input and output rates */
};
extern int preprocess_only;
@@ -75,8 +77,8 @@ extern char *html_template;
extern char *html_input_file;
extern int html_input_line;
extern int verbose_level;
-extern char *rate_unit;
+extern struct monitor default_monitor;
extern int percent_option;
extern int transparent_option;
extern int zero_unknown_option;

Return to:

Send suggestions and report system problems to the System administrator.