[英]AngularJS D3JS Donut chart colour change of arc on hover
I am creating donut using d3.js
with AngularJS
.我正在使用
d3.js
和AngularJS
创建甜甜圈。 Here is my Donut , by default I need to have same color for all the arcs of Donut chart, which is working fine.这是我的甜甜圈,默认情况下,我需要对甜甜圈图的所有弧线使用相同的颜色,这样可以正常工作。 Now on hover of the particular arc I need to change the color of that particular arc to blue, which is not working.
现在在特定弧的 hover 上,我需要将该特定弧的颜色更改为蓝色,这不起作用。 Can any one help me in this?
任何人都可以帮助我吗?
Using d3's style
method inside your directive's scope.mouseOverPath
and scope.mouseOutPath
methods did the trick.在指令的
scope.mouseOverPath
和scope.mouseOutPath
方法中使用 d3 的style
方法就可以了。
https://plnkr.co/edit/P98rPVKOHOgN5fKB https://plnkr.co/edit/P98rPVKOHOgN5fKB
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.