]> git.cworth.org Git - acre/blobdiff - acre.h
Add another dataset style: ACRE_STYLE_BARS
[acre] / acre.h
diff --git a/acre.h b/acre.h
index 663835c333dd8daca54b1f0da639f357280ea460..7924cba2d26d38603b0318ac1d319a3f72ed6198 100644 (file)
--- a/acre.h
+++ b/acre.h
@@ -89,7 +89,8 @@ void
 acre_set_y_axis_range_auto (acre_t *acre);
 
 /* Add a dataset to the plot. The plot assumes ownership of the
- * dataset so it is not necessary to call acre_data_destroy on it. */
+ * dataset so it is not necessary to call acre_data_destroy on it.
+ */
 void
 acre_add_data (acre_t *acre, acre_data_t *data);
 
@@ -111,6 +112,33 @@ acre_data_create (void);
 void
 acre_data_destroy (acre_data_t *data);
 
+/* The style to be used for rendering data sets. */
+typedef enum
+{
+       /* A simple line graph connection each (X,Y) pair in order. */
+       ACRE_STYLE_LINE,
+
+       /* A bar chart. */
+       ACRE_STYLE_BARS,
+
+       /* Bars if there is room for them, a line otherwise. */
+       ACRE_STYLE_BARS_OR_LINE,
+
+       /* A timeline.
+        *
+        * Each (X,Y) pair specifies the (start,stop) time of a
+        * timeline bar.
+        *
+        * The acre_data_add_point_2d_named function is particularly
+        * useful to provide a name for each timeline bar.
+        */
+       ACRE_STYLE_TIMELINE
+} acre_style_t;
+
+/* Set the rendering style for this dataset. */
+void
+acre_data_set_style (acre_data_t *data, acre_style_t style);
+
 /* Set the label for this dataset (to appear in the plot's key). */
 void
 acre_data_set_name (acre_data_t *data, const char *name);