Merge
[dygraphs.git] / dygraph-options-reference.js
index acb0626..eb07d10 100644 (file)
@@ -4,9 +4,6 @@
  * MIT-licensed (http://opensource.org/licenses/MIT)
  */
 
-/*jshint globalstrict: true */
-/*global Dygraph:false */
-
 // NOTE: in addition to parsing as JS, this snippet is expected to be valid
 // JSON. This assumption cannot be checked in JS, but it will be checked when
 // documentation is generated by the generate-documentation.py script. For the
@@ -339,8 +336,8 @@ Dygraph.OPTIONS_REFERENCE =  // <JSON>
   "axis": {
     "default": "(none)",
     "labels": ["Axis display"],
-    "type": "string or object",
-    "description": "Set to either an object ({}) filled with options for this axis or to the name of an existing data series with its own axis to re-use that axis. See tests for usage."
+    "type": "string",
+    "description": "Set to either 'y1' or 'y2' to assign a series to a y-axis (primary or secondary). Must be set per-series."
   },
   "pixelsPerXLabel": {
     "default": "",
@@ -371,7 +368,7 @@ Dygraph.OPTIONS_REFERENCE =  // <JSON>
     "default": "false",
     "labels": ["Axis display"],
     "type": "boolean",
-    "description": "When set for a y-axis, the graph shows that axis in log scale. Any values less than or equal to zero are not displayed.\n\nNot compatible with showZero, and ignores connectSeparatedPoints. Also, showing log scale with valueRanges that are less than zero will result in an unviewable graph."
+    "description": "When set for the y-axis or x-axis, the graph shows that axis in log scale. Any values less than or equal to zero are not displayed. Showing log scale with ranges that go below zero will result in an unviewable graph.\n\n Not compatible with showZero. connectSeparatedPoints is ignored. This is ignored for date-based x-axes."
   },
   "strokeWidth": {
     "default": "1.0",
@@ -425,6 +422,13 @@ Dygraph.OPTIONS_REFERENCE =  // <JSON>
     "type": "red, blue",
     "description": "The color of the gridlines. This may be set on a per-axis basis to define each axis' grid separately."
   },
+  "gridLinePattern": {
+    "default": "null",
+    "labels": ["Grid"],
+    "type": "array<integer>",
+    "example": "[10, 2, 5, 2]",
+    "description": "A custom pattern array where the even index is a draw and odd is a space in pixels. If null then it draws a solid line. The array should have a even length as any odd lengthed array could be expressed as a smaller even length array. This is used to create dashed gridlines."
+  },
   "visibility": {
     "default": "[true, true, ...]",
     "labels": ["Data Line display"],
@@ -486,6 +490,12 @@ Dygraph.OPTIONS_REFERENCE =  // <JSON>
     "type": "boolean",
     "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."
   },
+  "labelsUTC": {
+    "default": "false",
+    "labels": ["Value display/formatting", "Axis display"],
+    "type": "boolean",
+    "description": "Show date/time labels according to UTC (instead of local time)."
+  },
   "labelsKMB": {
     "default": "false",
     "labels": ["Value display/formatting"],
@@ -793,6 +803,12 @@ Dygraph.OPTIONS_REFERENCE =  // <JSON>
     "type": "string",
     "description": "The range selector mini plot fill color. This can be of the form \"#AABBCC\" or \"rgb(255,100,200)\" or \"yellow\". You can also specify null or \"\" to turn off fill."
   },
+  "showInRangeSelector": {
+    "default": "null",
+    "labels": ["Interactive Elements"],
+    "type": "boolean",
+    "description": "Mark this series for inclusion in the range selector. The mini plot curve will be an average of all such series. If this is not specified for any series, the default behavior is to average all the series. Setting it for one series will result in that series being charted alone in the range selector."
+  },
   "animatedZooms": {
     "default": "false",
     "labels": ["Interactive Elements"],
@@ -805,6 +821,12 @@ Dygraph.OPTIONS_REFERENCE =  // <JSON>
     "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."
   },
+  "axes": {
+    "default": "null",
+    "labels": ["Configuration"],
+    "type": "Object",
+    "description": "Defines per-axis options. Valid keys are 'x', 'y' and 'y2'. Only some options may be set on a per-axis basis. If an option may be set in this way, it will be noted on this page. See also documentation on <a href='http://dygraphs.com/per-axis.html'>per-series and per-axis options</a>."
+  },
   "series": {
     "default": "null",
     "labels": ["Series"],