From 3f2f472e324e61c55672111bfe0d9825bca5d5a3 Mon Sep 17 00:00:00 2001 From: Robert Konigsberg Date: Thu, 9 Jun 2011 16:39:36 -0400 Subject: [PATCH] Update document reference; add docs for pointClickCallback, and clarify clickCallback. --- dygraph-options-reference.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/dygraph-options-reference.js b/dygraph-options-reference.js index 6ba8f8e..6dd081e 100644 --- a/dygraph-options-reference.js +++ b/dygraph-options-reference.js @@ -47,10 +47,11 @@ Dygraph.OPTIONS_REFERENCE = // "description": "A function to call when the zoom window is changed (either by zooming in or out). minDate and maxDate are milliseconds since epoch. yRanges is an array of [bottom, top] pairs, one for each y-axis." }, "pointClickCallback": { - "default": "", + "snippet": "function(e, point){
  alert(point);
}", + "default": "null", "labels": ["Callbacks", "Interactive Elements"], - "type": "", - "description": "" + "type": "function(e, point)", + "description": "A function to call when a data point is clicked. The function should take two arguments, the event object for the click, and the point that was clicked." }, "colors": { "default": "(see description)", @@ -354,8 +355,9 @@ Dygraph.OPTIONS_REFERENCE = // "snippet": "function(e, date){
  alert(date);
}", "default": "null", "labels": ["Callbacks"], - "type": "function(e, date)", - "description": "A function to call when a data point is clicked. The function should take two arguments, the event object for the click and the date that was clicked." + "type": "function(e, date, points)", + // NOTE(konigsberg): Is this description correct? + "description": "A function to call when the canvas is clicked. The function should take three arguments, the event object for the click, the date that was clicked, and the closest points along that date." }, "yAxisLabelFormatter": { "default": "yValueFormatter", -- 2.7.4