X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph-options-reference.js;h=74b7beded486f09ff906bf0d0d54ac9475f219d0;hb=47c97d86490258703f825f1b50f519b8772380c8;hp=6ba8f8e9f251410a534a73ea3292bb47c312b27b;hpb=1b89e01f33c071af04e0586163fa3c09ac115b09;p=dygraphs.git diff --git a/dygraph-options-reference.js b/dygraph-options-reference.js index 6ba8f8e..74b7bed 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. The 'point' argument has these properties:\n * xval/yval: The data coordinates of the point (with dates/times as millis since epoch) \n * canvasx/canvasy: The canvas coordinates at which the point is drawn. \n name: The name of the data series to which the point belongs" }, "colors": { "default": "(see description)", @@ -351,11 +352,11 @@ Dygraph.OPTIONS_REFERENCE = // "description": "Function to call to format values along the x axis." }, "clickCallback": { - "snippet": "function(e, date){
  alert(date);
}", + "snippet": "function(e, date_millis){
  alert(new Date(date_millis));
}", "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, x, points)", + "description": "A function to call when the canvas is clicked. The function should take three arguments, the event object for the click, the x-value that was clicked (for dates this is millis since epoch), and the closest points along that date. The points have these properties:\n * xval/yval: The data coordinates of the point (with dates/times as millis since epoch) \n * canvasx/canvasy: The canvas coordinates at which the point is drawn. \n name: The name of the data series to which the point belongs" }, "yAxisLabelFormatter": { "default": "yValueFormatter", @@ -544,6 +545,12 @@ Dygraph.OPTIONS_REFERENCE = // "labels": ["Data"], "type": "string (URL of CSV or CSV), GViz DataTable or 2D Array", "description": "Sets the data being displayed in the chart. This can only be set when calling updateOptions; it cannot be set from the constructor. For a full description of valid data formats, see the Data Formats page." + }, + "timingName": { + "default": "null", + "labels": [ "Debugging" ], + "type": "string", + "description": "Set this option to log timing information. The value of the option will be logged along with the timimg, so that you can distinguish multiple dygraphs on the same page." } } ; // @@ -572,7 +579,8 @@ Dygraph.OPTIONS_REFERENCE = // 'Overall display', 'Rolling Averages', 'Value display/formatting', - 'Zooming' + 'Zooming', + 'Debugging' ]; var cats = {}; for (var i = 0; i < valid_cats.length; i++) cats[valid_cats[i]] = true;