X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=src%2Fdygraph-options-reference.js;h=4b1a23bf6dfd9e32a67c55a341945566b6050bfb;hb=93ec1094eb75477b455efaa7adeb10190b87992b;hp=0f3ebfa1dcc760d01b475b5dcb45940e5dfe5ff0;hpb=1715eee9eec72048d8fd94ce19127c330be3033e;p=dygraphs.git diff --git a/src/dygraph-options-reference.js b/src/dygraph-options-reference.js index 0f3ebfa..4b1a23b 100644 --- a/src/dygraph-options-reference.js +++ b/src/dygraph-options-reference.js @@ -463,6 +463,15 @@ OPTIONS_REFERENCE = // "type": "string", "description": "When to display the legend. By default, it only appears when a user mouses over the chart. Set it to \"always\" to always display a legend of some sort. When set to \"follow\", legend follows highlighted points." }, + "legendFormatter": { + "default": "null", + "labels": ["Legend"], + "type": "function(data): string", + "params": [ + [ "data", "An object containing information about the selection (or lack of a selection). This includes formatted values and series information. See here for sample values." ] + ], + "description": "Set this to supply a custom formatter for the legend. See this comment and the legendFormatter demo for usage." + }, "labelsShowZeroValues": { "default": "true", "labels": ["Legend"],