X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph-options-reference.js;h=9d4a4857690fa5ebdab425b4478d50bf3acdd214;hb=45b74fb1d2acd535102445a8a9301d7a6a39192d;hp=04f13d7038da5ba8b067b0bc660f6c6b5de94dcb;hpb=f34f95d1f2fe3adcc0bbe578368740afba513d9f;p=dygraphs.git diff --git a/dygraph-options-reference.js b/dygraph-options-reference.js index 04f13d7..9d4a485 100644 --- a/dygraph-options-reference.js +++ b/dygraph-options-reference.js @@ -269,10 +269,10 @@ Dygraph.OPTIONS_REFERENCE = // "underlayCallback": { "default": "null", "labels": ["Callbacks"], - "type": "function(canvas, area, dygraph)", + "type": "function(context, area, dygraph)", "parameters": [ - [ "canvas" , "the canvas to draw on" ], - [ "area" , "" ], + [ "context" , "the canvas drawing context on which to draw" ], + [ "area" , "An object with {x,y,w,h} properties describing the drawing area." ], [ "dygraph" , "the reference graph" ] ], "description": "When set, this callback gets called before the chart is drawn. It details on how to use this." @@ -396,7 +396,7 @@ Dygraph.OPTIONS_REFERENCE = // "default": "false", "labels": ["Data Line display"], "type": "boolean", - "description": "Should the area underneath the graph be filled? This option is not compatible with error bars." + "description": "Should the area underneath the graph be filled? This option is not compatible with error bars. This may be set on a per-series basis." }, "highlightCircleSize": { "default": "3", @@ -421,7 +421,7 @@ Dygraph.OPTIONS_REFERENCE = // "labels": ["Axis display"], "type": "Array of two numbers", "example": "[10, 110]", - "description": "Explicitly set the vertical range of the graph to [low, high]. This may be set on a per-axis basis to define each y-axis separately." + "description": "Explicitly set the vertical range of the graph to [low, high]. This may be set on a per-axis basis to define each y-axis separately. If either limit is unspecified, it will be calculated automatically (e.g. [null, 30] to automatically calculate just the lower bound)" }, "labelsDivWidth": { "default": "250", @@ -469,7 +469,7 @@ Dygraph.OPTIONS_REFERENCE = // "default": "false", "labels": ["Data Line display"], "type": "boolean", - "description": "When set, display the graph as a step plot instead of a line plot." + "description": "When set, display the graph as a step plot instead of a line plot. This option may either be set for the whole graph or for single series." }, "labelsKMB": { "default": "false", @@ -728,7 +728,7 @@ Dygraph.OPTIONS_REFERENCE = // "default": "false", "labels": ["Interactive Elements"], "type": "boolean", - "description": "Show the range selector widget. This option can only be specified at Dygraph creation time." + "description": "Show or hide the range selector widget." }, "rangeSelectorHeight": { "default": "40", @@ -753,6 +753,24 @@ Dygraph.OPTIONS_REFERENCE = // "labels": ["Interactive Elements"], "type": "boolean", "description": "Set this option to animate the transition between zoom windows. Applies to programmatic and interactive zooms. Note that if you also set a drawCallback, it will be called several times on each zoom. If you set a zoomCallback, it will only be called after the animation is complete." + }, + "plotter": { + "default": "[DygraphCanvasRenderer.Plotters.fillPlotter, DygraphCanvasRenderer.Plotters.errorPlotter, DygraphCanvasRenderer.Plotters.linePlotter]", + "labels": ["Data Line display"], + "type": "array or function", + "description": "A function (or array of functions) which plot each data series on the chart. TODO(danvk): more details! May be set per-series." + }, + "series": { + "default": "null", + "labels": ["Series"], + "type": "Object", + "description": "Defines per-series options. Its keys match the y-axis label names, and the values are dictionaries themselves that contain options specific to that series. When this option is missing, it falls back on the old-style of per-series options comingled with global options." + }, + "plugins": { + "default": "[]", + "labels": ["Configuration"], + "type": "Array", + "description": "Defines per-graph plug-ins. Useful for per-graph customization" } } ; // @@ -764,7 +782,7 @@ Dygraph.OPTIONS_REFERENCE = // // Do a quick sanity check on the options reference. (function() { "use strict"; - var warn = function(msg) { if (console) console.warn(msg); }; + var warn = function(msg) { if (window.console) window.console.warn(msg); }; var flds = ['type', 'default', 'description']; var valid_cats = [ 'Annotations', @@ -781,9 +799,11 @@ Dygraph.OPTIONS_REFERENCE = // 'Legend', 'Overall display', 'Rolling Averages', + 'Series', 'Value display/formatting', 'Zooming', 'Debugging', + 'Configuration', 'Deprecated' ]; var i;