admin管理员组文章数量:1415139
I'm trying to figure out how to highlight a line (series) in Highcharts from an element that's not related to the Chart object in any way.
I went through the documentation, and don't really see a way of achieving this. I can get into the series elements using the series.get(id)
.
Seems like there are no methods that can be helpful -
Any ideas if that's even possible?
I'm trying to figure out how to highlight a line (series) in Highcharts from an element that's not related to the Chart object in any way.
I went through the documentation, and don't really see a way of achieving this. I can get into the series elements using the series.get(id)
.
Seems like there are no methods that can be helpful - http://www.highcharts./ref/#series-object
Any ideas if that's even possible?
Share Improve this question asked Jan 10, 2012 at 20:30 Oskar KrawczykOskar Krawczyk 3,50319 silver badges20 bronze badges1 Answer
Reset to default 9After a lot of digging and testing, I've managed to get this working - still not sure if this is the best way (probably not).
Chart.series.get(someId).graph.attr('stroke-width', '5')
Unfortunately, this is just getting into the actual DOM element and changing the value of the property of a single element, so if you need to change the stroke width, and the styles of the markers on this line, you'd have to loop through all elements, and apply changes manually.
UPDATE: Ok, there's a better way
But this is using the private API, so if the library changes thins, your code will not work:
Chart.series.get(someId).onMouseOver()
and Chart.series.get(someId).onMouseOut()
.
This actually fires the defined hover-state.
本文标签: javascriptHighlighting Highcharts series from a remote elementStack Overflow
版权声明:本文标题:javascript - Highlighting Highcharts series from a remote element - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745228134a2648702.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论