X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph-options-reference.js;h=cb8b767497fa2e6d18e2bacd724a8360e19c40bc;hb=a7803eea480d293985319aa33a70c95c54cf0781;hp=3bef499290b24c2c04b15f38d7f5944bd467e272;hpb=65728bc9155b54d20889d255f6d3d8766af8c144;p=dygraphs.git diff --git a/dygraph-options-reference.js b/dygraph-options-reference.js index 3bef499..cb8b767 100644 --- a/dygraph-options-reference.js +++ b/dygraph-options-reference.js @@ -111,13 +111,14 @@ Dygraph.OPTIONS_REFERENCE = // "highlightCallback": { "default": "null", "labels": ["Callbacks"], - "type": "function(event, x, points, row)", + "type": "function(event, x, points, row, seriesName)", "description": "When set, this callback gets called every time a new point is highlighted.", "parameters": [ ["event", "the JavaScript mousemove event"], ["x", "the x-coordinate of the highlighted points"], ["points", "an array of highlighted points: [ {name: 'series', yval: y-value}, … ]"], - ["row", "???"] + ["row", "integer index of the highlighted row in the data table, starting from 0"], + ["seriesName", "name of the highlighted series, only present if highlightSeriesOpts is set."] ] }, "drawHighlightPointCallback": { @@ -138,6 +139,18 @@ Dygraph.OPTIONS_REFERENCE = // should constrain drawing to within pointSize pixels from (cx, cy) \ Also see drawPointCallback" }, + "highlightSeriesOpts": { + "default": "null", + "labels": ["Interactive Elements"], + "type": "Object", + "description": "When set, the options from this object are applied to the timeseries closest to the mouse pointer for interactive highlighting. See also 'highlightCallback'. Example: highlightSeriesOpts: { strokeWidth: 3 }." + }, + "highlightSeriesBackgroundAlpha": { + "default": "0.5", + "labels": ["Interactive Elements"], + "type": "float", + "description": "Fade the background while highlighting series. 1=fully visible background (disable fading), 0=hiddden background (show highlighted series only)." + }, "includeZero": { "default": "false", "labels": ["Axis display"], @@ -354,7 +367,7 @@ Dygraph.OPTIONS_REFERENCE = // "strokeWidth": { "default": "1.0", "labels": ["Data Line display"], - "type": "integer", + "type": "float", "example": "0.5, 2.0", "description": "The width of the lines connecting data points. This can be used to increase the contrast or some graphs." }, @@ -365,6 +378,20 @@ Dygraph.OPTIONS_REFERENCE = // "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." }, + "strokeBorderWidth": { + "default": "null", + "labels": ["Data Line display"], + "type": "float", + "example": "1.0", + "description": "Draw a border around graph lines to make crossing lines more easily distinguishable. Useful for graphs with many lines." + }, + "strokeBorderColor": { + "default": "white", + "labels": ["Data Line display"], + "type": "string", + "example": "red, #ccffdd", + "description": "Color for the line border used if strokeBorderWidth is set." + }, "wilsonInterval": { "default": "true", "labels": ["Error Bars"],