문제

I am rendering multiple independent time series with Dygraphs as described here:

http://dygraphs.com/tests/independent-series.html

The graph is rendered correctly:

graph

However I want the legend to display the value for each and every series. For now only the value of the point closest to the cursor is displayed.

How can I fix this?

도움이 되었습니까?

해결책

There's no built-in support for this.

To dygraphs, a selection always has a specific x-value. There's no notion of a set of points with different x-values that are all selected. That being said, you could roll your own legend behavior using highlightCallback and unhighlightCallback. See this question/answer for an example of someone who did that.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top