Is it possible to always show the values of the signals in the legend even when the mouse is not over the figure?
I think values appearing and disappearing when the mouse is not over the figure are a bit annoying and I would like to come up with a solution which:
x = 0
Would it be possible to get something like this? If yes, how?
EDIT: I found out there are callbacks sensitive to mouse events. In particular, highlightCallback
and unhighlightCallback
may be used to obtain what I want. Unfortunately, I do not find any example that shows how to change what's shown in the legend, I've only found examples which add HTML below the figure, like in this callback example .
The numbers in the legend reflect the current selection. If there's no selection, there will be no numbers. So try calling setSelection
in unhighlightCallback
.
Alternatively, use the new legendFormatter
option. (Until v2 is released, this will require you to build dygraphs from HEAD
.)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.