简体   繁体   中英

AngularJS D3JS Donut chart colour change of arc on hover

I am creating donut using d3.js with 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. 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.

https://plnkr.co/edit/P98rPVKOHOgN5fKB

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM