From 47e07d0898e6edc0f21a137167276a083b1d9c8f Mon Sep 17 00:00:00 2001 From: Robert Konigsberg Date: Mon, 27 Feb 2012 22:06:27 -0500 Subject: [PATCH] Fix option reference, remove line continuation hack. --- dygraph-options-reference.js | 22 +++++----------------- generate-documentation.py | 2 -- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/dygraph-options-reference.js b/dygraph-options-reference.js index cb8b767..0e6b98e 100644 --- a/dygraph-options-reference.js +++ b/dygraph-options-reference.js @@ -41,11 +41,7 @@ Dygraph.OPTIONS_REFERENCE = // "default": "false", "labels": ["Data Line display"], "type": "boolean", - "description": "Draw a small dot at each point, in addition to a line going through \ - the point. This makes the individual data points easier to see, but \ - can increase visual clutter in the chart. The small dot can be \ - replaced with a custom rendering by supplying a \ - drawPointCallback." + "description": "Draw a small dot at each point, in addition to a line going through the point. This makes the individual data points easier to see, but can increase visual clutter in the chart. The small dot can be replaced with a custom rendering by supplying a drawPointCallback." }, "drawPointCallback": { "default": "null", @@ -60,17 +56,13 @@ Dygraph.OPTIONS_REFERENCE = // [ "color" , "series color" ], [ "pointSize" , "the radius of the image." ] ], - "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 drawHighlightPointCallback" + "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 drawHighlightPointCallback" }, "height": { "default": "320", "labels": ["Overall display"], "type": "integer", - "description": "Height, in pixels, of the chart. If the container div has \ - been explicitly sized, this will be ignored." + "description": "Height, in pixels, of the chart. If the container div has been explicitly sized, this will be ignored." }, "zoomCallback": { "default": "null", @@ -81,8 +73,7 @@ Dygraph.OPTIONS_REFERENCE = // [ "maxDate" , "milliseconds since epoch." ], [ "yRanges" , "is an array of [bottom, top] pairs, one for each y-axis." ] ], - "description": "A function to call when the zoom window is changed (either \ - by zooming in or out)." + "description": "A function to call when the zoom window is changed (either by zooming in or out)." }, "pointClickCallback": { "snippet": "function(e, point){
  alert(point);
}", @@ -134,10 +125,7 @@ Dygraph.OPTIONS_REFERENCE = // [ "color" , "series color" ], [ "pointSize" , "the radius of the image." ] ], - "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 drawPointCallback" + "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 drawPointCallback" }, "highlightSeriesOpts": { "default": "null", diff --git a/generate-documentation.py b/generate-documentation.py index 613dec7..0614bef 100755 --- a/generate-documentation.py +++ b/generate-documentation.py @@ -21,8 +21,6 @@ for line in file('dygraph-options-reference.js'): elif '' in line: in_json = False elif in_json: - if line.endswith("\\\n"): # hacked in line continuation support with trailing \. - line = line[:-2] js += line # TODO(danvk): better errors here. -- 2.7.4