Search code examples
javascriptdygraphs

Always show labels in legend for Dygraphs


I am plotting multiple series of time course data against each other, and many of the sets of data were captured at different times. The graphs looks like what is seen in the Independent Series example: http://dygraphs.com/gallery/#g/independent-series

However, the users find it distracting that what is in the legend changes as you mouseover the graph. I would like it to consistently display A: (value) B: (value) instead of just the line that has a y-value associated with the x-value.

I haven't been able to find a way to do this in my searching, and was hoping someone had found a way to work around this.

Thanks!


Solution

  • It's not possible to do this with the built-in legend. You'll have to write your own using highlightCallback and unhighlightCallback.