summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jarmon/jarmon.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/jarmon/jarmon.js b/jarmon/jarmon.js
index d941a8f..2a87b55 100644
--- a/jarmon/jarmon.js
+++ b/jarmon/jarmon.js
@@ -1176,13 +1176,25 @@ jarmon.TabbedInterface.prototype.setup = function() {
/**
* Setup chart date range controls and all charts
*
+ * For each chart, a clone of the $chartTemplate are inserted into the document,
+ * and these inserted copies are passed to `new {@link jarmon.Chart}()`.
+ * Therefore, the $chartTemplate should have elements matching the same
+ * selectors documented there. However, in addition to those, it is useful to
+ * have elements matching these selectors:
+ *
+ * - `input[name=chart_edit]` (optional) : A button to be clicked. If present,
+ * when clicked, the graph-legend will turn in to a {@link
+ * jarmon.ChartEditor}, allowing the user to edit the chart's recipe.
+ * - `input[name=chart_delete]` (optional) : A button to be clicked. If
+ * present, when clicked, the graph will be removed from the UI.
+ *
* @todo Figure out how to allow `$chartTemplate` to be an HTML5 <template>
* element.
*
* @method
* @requires jQuery
*
- * @param $chartTemplate {module:jQuery.jQuery} See {@link jarmon.Chart}
+ * @param $chartTemplate {module:jQuery.jQuery} See {@link jarmon.Chart}, see above
* @param chartRecipes {Object.<string, recipe>} A map of
* placeholder-names (see {@link jarmon.TabbedInterface})
* to chart recipes (see {@link jarmon.Chart})