summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-08-13 23:18:17 -0600
committerLuke Shumaker <lukeshu@lukeshu.com>2017-08-13 23:18:17 -0600
commitc596af8874c87df1d7f30feebbd02dd9ef0c4789 (patch)
treefdfb946957f2d9d852f7e43bbb15c25dc4ce2e42
parent8b07dc5cb8c259e8e51e2e2a81d9f03284b62cf1 (diff)
docs: document the requirements of the Chart template
-rw-r--r--jarmon/jarmon.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/jarmon/jarmon.js b/jarmon/jarmon.js
index 5f8d854..d941a8f 100644
--- a/jarmon/jarmon.js
+++ b/jarmon/jarmon.js
@@ -452,12 +452,20 @@ jarmon.RrdQueryDsProxy.prototype.getData = function(startTime, endTime) {
/**
* A class for creating a Flot chart from a series of RRD Queries
*
+ * The `template` parameter should be a jQuery for a DOM node containing
+ * elements matching these selectors:
+ *
+ * - `.title` : Placeholder for the title
+ * - `.chart` : Placeholder for the chart itself
+ * - `.graph-legend` : Placeholder for the chart legend
+ * - `.error` : Placeholder for any error message (will be hidden on success)
+ *
* @constructor
* @requires jQuery
* @requires Flot
*
- * @param template {module:jQuery.jQuery} A jQuery containing a single element
- * into which the chart will be drawn
+ * @param template {module:jQuery.jQuery} A one-element jQuery containing
+ * placeholders for chart elements.
* @param recipe {Object}
* @param recipe.title {string}
* @param recipe.data {Array}