summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4568880)
raw | patch | inline | side by side (parent: 4568880)
author | Florian Forster <ff@octo.it> | |
Mon, 14 Jun 2010 21:53:07 +0000 (23:53 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 14 Jun 2010 21:53:07 +0000 (23:53 +0200) |
graph_def.c | patch | blob | history |
diff --git a/graph_def.c b/graph_def.c
index 36b6747a4d46a9e9b7d6754734ba2e691eb27952..71ba1bdfe84c2ef3fd352f3132a8731a892ec423 100644 (file)
--- a/graph_def.c
+++ b/graph_def.c
char *ds_name;
char *legend;
uint32_t color;
+ _Bool stack;
+ _Bool area;
graph_def_t *next;
};
graph_config_get_string (child, &def->legend);
else if (strcasecmp ("Color", child->key) == 0)
def_config_color (child, &def->color);
+ else if (strcasecmp ("Stack", child->key) == 0)
+ graph_config_get_bool (child, &def->stack);
+ else if (strcasecmp ("Area", child->key) == 0)
+ graph_config_get_bool (child, &def->area);
+ else
+ fprintf (stderr, "def_config: Ignoring unknown config option \"%s\"",
+ child->key);
}
return (gl_graph_add_def (cfg, def));
index, index);
/* Graph part */
- array_append_format (args, "LINE1:def_%04i_avg#%06"PRIx32":%s",
+ array_append_format (args, "%s:def_%04i_avg#%06"PRIx32":%s%s",
+ def->area ? "AREA" : "LINE1",
index, def->color,
- (def->legend != NULL) ? def->legend : def->ds_name);
+ (def->legend != NULL) ? def->legend : def->ds_name,
+ def->stack ? ":STACK" : "");
array_append_format (args, "GPRINT:vdef_%04i_min:%%lg min,", index);
array_append_format (args, "GPRINT:vdef_%04i_avg:%%lg avg,", index);
array_append_format (args, "GPRINT:vdef_%04i_max:%%lg max,", index);