Reputation: 187
Is there a parameter for the Dygraphs legend option (e.g., 'never') that will hide the legend entirely? I'm looking for the opposite of "always", and hoping there is a cleaner way to suppress the legend than associating it with its own labelsDiv, creating that div, and styling that div's visibility as "hidden".
Upvotes: 1
Views: 2826
Reputation: 31
I think the option to supress the legend display is now explicitly available in version 2.0.0:
showLabelsOnHighlight: false
Upvotes: 3
Reputation: 137
As already stated, there doesn't seem to be an explicit option right now, but you can easily set the labelsDivWidth option to 0 to hide it.
options.labelsDivWidth = 0;
Upvotes: 3
Reputation: 116
That option doesn't exist. The project source code (on lines 289 and 290) says
// TODO(danvk): support 'onmouseover' and 'never', and remove synonyms.
legend: 'onmouseover', // the only relevant value at the moment is 'always'.
Therefore, for now you have to create a div with visibility as "hidden".
Upvotes: 2