gfio: graphing updates
[fio.git] / graph.h
diff --git a/graph.h b/graph.h
index 9eb33d7fe121b7e0062cb8e16e5794e728f931f1..00995259b3a70bcd2041d615f5f3c5e7cf40b58a 100644 (file)
--- a/graph.h
+++ b/graph.h
@@ -8,6 +8,8 @@ struct graph *graph_new(unsigned int xdim, unsigned int ydim, const char *font);
 /* graph_new() Returns a new graph structure of the given dimensions and font */
 void graph_set_size(struct graph *g, unsigned int xdim, unsigned int ydim);
 /* graph_set_size() Changes the size of a graph to the given dimensions. */ 
+void graph_set_position(struct graph *g, double xoffset, double yoffset);
+/* graph_set_position() sets the x- and y-offset to translate the graph */
 void bar_graph_draw(struct graph *g, cairo_t *cr);
 /* bar_graph_draw() draws the given graph as a bar graph */
 void line_graph_draw(struct graph *g, cairo_t *cr);
@@ -48,7 +50,7 @@ void graph_add_label(struct graph *g, const char *label);
 int graph_add_data(struct graph *g, const char *label, const double value);
 /* graph_add_data() is used to add data to the labels of a bar graph */
 int graph_add_xy_data(struct graph *g, const char *label,
-               const double x, const double y);
+               const double x, const double y, const char *tooltip);
 /* graph_add_xy_data is used to add data to the labels of a line graph */
 
 void graph_set_color(struct graph *g, const char *label,
@@ -73,5 +75,17 @@ void graph_y_axis_unit_change_notify(struct graph *g, graph_axis_unit_change_cal
  * millions, thousands and ones. 
  */ 
 
+void graph_add_extra_space(struct graph *g, double left_percent, double right_percent,
+                               double top_percent, double bottom_percent);
+/* graph_add_extra_space() adds extra space to edges of the the graph
+ * so that the data doesn't go to the very edges.
+ */
+
+extern int graph_has_tooltips(struct graph *g);
+extern const char *graph_find_tooltip(struct graph *g, int x, int y);
+extern int graph_contains_xy(struct graph *p, int x, int y);
+
+extern void graph_set_base_offset(struct graph *g, unsigned int base_offset);
+
 #endif