From a5bbe95bbc97ce673e51c7025ae2452c35af2450 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 13 Aug 2017 23:19:37 -0600 Subject: docs: buildTabbedChartUi(): Document the extra features of the chart tmpl --- jarmon/jarmon.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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