Use highlightCallback to highlight in Synchronized graphs points with same 'x'

自闭症网瘾萝莉.ら 提交于 2020-01-03 03:47:27

问题


I'm successfully synchronizing several dygraph graphs on the zoom ranges (using zoomCallback and the updateOptions({dateWindow: new_range})).

I would like to synchronize also the highlights. When the user highlight one point (x,y) in one of the graphs, I would like to highlight all points with the same x in the other graphs.

Someone knows a way to do this?

In my particular case, each graph contains one serie only, and all series have the same x ranges.


回答1:


Set a highlightCallback and unhighlightCallback on each chart which calls setSelection on the others. See the dygraphs options reference and API for syntax.



来源:https://stackoverflow.com/questions/19431540/use-highlightcallback-to-highlight-in-synchronized-graphs-points-with-same-x

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!