"default": "false",
"labels": ["Data Line display"],
"type": "boolean",
- "description": "If set, stack series on top of one another rather than drawing them independently. The first series specified in the input data will wind up on top of the chart and the last will be on bottom."
+ "description": "If set, stack series on top of one another rather than drawing them independently. The first series specified in the input data will wind up on top of the chart and the last will be on bottom. NaN values are drawn as white areas without a line on top, see stackedGraphNaNFill for details."
+ },
+ "stackedGraphNaNFill": {
+ "default": "all",
+ "labels": ["Data Line display"],
+ "type": "string",
+ "description": "Controls handling of NaN values inside a stacked graph. NaN values are interpolated/extended for stacking purposes, but the actual point value remains NaN in the legend display. Valid option values are \"all\" (interpolate internally, repeat leftmost and rightmost value as needed), \"inside\" (interpolate internally only, use zero outside leftmost and rightmost value), and \"none\" (treat NaN as zero everywhere)."
},
"pointSize": {
"default": "1",
[ "cx" , "center x coordinate" ],
[ "cy" , "center y coordinate" ],
[ "color" , "series color" ],
- [ "pointSize" , "the radius of the image." ]
+ [ "pointSize" , "the radius of the image." ],
+ [ "idx" , "the row-index of the point in the data."]
],
"description": "Draw a custom item when drawPoints is enabled. Default is a small dot matching the series color. This method should constrain drawing to within pointSize pixels from (cx, cy). Also see <a href='#drawHighlightPointCallback'>drawHighlightPointCallback</a>"
},
],
"description": "A function to call when a data point is clicked. and the point that was clicked."
},
+ "color": {
+ "default": "(see description)",
+ "labels": ["Data Series Colors"],
+ "type": "string",
+ "example": "red",
+ "description": "A per-series color definition. Used in conjunction with, and overrides, the colors option."
+ },
"colors": {
"default": "(see description)",
"labels": ["Data Series Colors"],
"type": "array<string>",
"example": "['red', '#00FF00']",
- "description": "List of colors for the data series. These can be of the form \"#AABBCC\" or \"rgb(255,100,200)\" or \"yellow\", etc. If not specified, equally-spaced points around a color wheel are used."
+ "description": "List of colors for the data series. These can be of the form \"#AABBCC\" or \"rgb(255,100,200)\" or \"yellow\", etc. If not specified, equally-spaced points around a color wheel are used. Overridden by the 'color' option."
},
"connectSeparatedPoints": {
"default": "false",
[ "cx" , "center x coordinate" ],
[ "cy" , "center y coordinate" ],
[ "color" , "series color" ],
- [ "pointSize" , "the radius of the image." ]
+ [ "pointSize" , "the radius of the image." ],
+ [ "idx" , "the row-index of the point in the data."]
],
"description": "Draw a custom item when a point is highlighted. Default is a small dot matching the series color. This method should constrain drawing to within pointSize pixels from (cx, cy) Also see <a href='#drawPointCallback'>drawPointCallback</a>"
},
"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."
"default": "rgb(128,128,128)",
"labels": ["Grid"],
"type": "red, blue",
- "description": "The color of the gridlines."
+ "description": "The color of the gridlines. This may be set on a per-axis basis to define each axis' grid separately."
},
"visibility": {
"default": "[true, true, ...]",
"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",
"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",
},
"avoidMinZero": {
"default": "false",
- "labels": ["Axis display"],
+ "labels": ["Deprecated"],
"type": "boolean",
- "description": "When set, the heuristic that fixes the Y axis at zero for a data set with the minimum Y value of zero is disabled. \nThis is particularly useful for data sets that contain many zero values, especially for step plots which may otherwise have lines not visible running along the bottom axis."
+ "description": "Deprecated, please use yRangePad instead. When set, the heuristic that fixes the Y axis at zero for a data set with the minimum Y value of zero is disabled. \nThis is particularly useful for data sets that contain many zero values, especially for step plots which may otherwise have lines not visible running along the bottom axis."
},
"drawAxesAtZero": {
"default": "false",
"type": "boolean",
"description": "When set, draw the X axis at the Y=0 position and the Y axis at the X=0 position if those positions are inside the graph's visible area. Otherwise, draw the axes at the bottom or left graph edge as usual."
},
+ "xRangePad": {
+ "default": "0",
+ "labels": ["Axis display"],
+ "type": "float",
+ "description": "Add the specified amount of extra space (in pixels) around the X-axis value range to ensure points at the edges remain visible."
+ },
+ "yRangePad": {
+ "default": "null",
+ "labels": ["Axis display"],
+ "type": "float",
+ "description": "If set, add the specified amount of extra space (in pixels) around the Y-axis value range to ensure points at the edges remain visible. If unset, use the traditional Y padding algorithm."
+ },
"xAxisLabelFormatter": {
"default": "",
"labels": ["Deprecated"],
"dateWindow": {
"default": "Full range of the input is shown",
"labels": ["Axis display"],
- "type": "Array of two Dates or numbers",
+ "type": "Array of two numbers",
"example": "[<br> Date.parse('2006-01-01'),<br> (new Date()).valueOf()<br>]",
"description": "Initially zoom in on a section of the graph. Is of the form [earliest, latest], where earliest/latest are milliseconds since epoch. If the data for the x-axis is numeric, the values in dateWindow must also be numbers."
},
},
"drawXGrid": {
"default": "true",
- "labels": ["Grid"],
+ "labels": ["Grid","Deprecated"],
"type": "boolean",
- "description" : "Whether to display vertical gridlines under the chart."
+ "description" : "Use the per-axis option drawGrid instead. Whether to display vertical gridlines under the chart."
},
"drawYGrid": {
"default": "true",
+ "labels": ["Grid","Deprecated"],
+ "type": "boolean",
+ "description" : "Use the per-axis option drawGrid instead. Whether to display horizontal gridlines under the chart."
+ },
+ "drawGrid": {
+ "default": "true for x and y, false for y2",
"labels": ["Grid"],
"type": "boolean",
- "description" : "Whether to display horizontal gridlines under the chart."
+ "description" : "Whether to display gridlines in the chart. This may be set on a per-axis basis to define the visibility of each axis' grid separately."
+ },
+ "independentTicks": {
+ "default": "true for y, false for y2",
+ "labels": ["Axis display", "Grid"],
+ "type": "boolean",
+ "description" : "Only valid for y and y2, has no effect on x: This option defines whether the y axes should align their ticks or if they should be independent. Possible combinations: 1.) y=true, y2=false (default): y is the primary axis and the y2 ticks are aligned to the the ones of y. (only 1 grid) 2.) y=false, y2=true: y2 is the primary axis and the y ticks are aligned to the the ones of y2. (only 1 grid) 3.) y=true, y2=true: Both axis are independent and have their own ticks. (2 grids) 4.) y=false, y2=false: Invalid configuration causes an error."
},
"drawXAxis": {
"default": "true",
"default": "0.3",
"labels": ["Grid"],
"type": "float",
- "description" : "Thickness (in pixels) of the gridlines drawn under the chart. The vertical/horizontal gridlines can be turned off entirely by using the drawXGrid and drawYGrid options."
+ "description" : "Thickness (in pixels) of the gridlines drawn under the chart. The vertical/horizontal gridlines can be turned off entirely by using the drawXGrid and drawYGrid options. This may be set on a per-axis basis to define each axis' grid separately."
},
"axisLineWidth": {
"default": "0.3",
"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",
"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<plugin>",
+ "description": "Defines per-graph plugins. Useful for per-graph customization"
+ },
+ "dataHandler": {
+ "default": "(depends on data)",
+ "labels": ["Data"],
+ "type": "Dygraph.DataHandler",
+ "description": "Custom DataHandler. This is an advanced customization. See http://bit.ly/151E7Aq."
}
}
; // </JSON>
// 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',
'Legend',
'Overall display',
'Rolling Averages',
+ 'Series',
'Value display/formatting',
'Zooming',
'Debugging',
+ 'Configuration',
'Deprecated'
];
var i;