From c596af8874c87df1d7f30feebbd02dd9ef0c4789 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 13 Aug 2017 23:18:17 -0600 Subject: docs: document the requirements of the Chart template --- jarmon/jarmon.js | 12 ++++++++++-- 1 file 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} -- cgit v1.1-4-g5e80