David-Desmaisons / Vue.D3.tree

Vue component to display tree based on D3.js layout.
https://david-desmaisons.github.io/Vue.D3.tree/tree
MIT License
878 stars 136 forks source link

How to change the color of lines linked with a specified node in the tree component? #19

Closed Aaron-Coding-Coding closed 6 years ago

Aaron-Coding-Coding commented 6 years ago

hello David. How to change the color of lines linked with a specified node in the tree component? just like Hierarchical Edge Bundling component , when the mouse move on a node , the lines color changed. i want the same effect in tree component. thanks for any suggestions.

David-Desmaisons commented 6 years ago

Hello @Aaron-Coding-Coding , based on waht information the color should be choosen? I am not sure that I can think of a generic way of providing this kind of feature.

Aaron-Coding-Coding commented 6 years ago

i mean , change the lines color linked with the mouse clicked node , If there is a convenient way to achieve.

David-Desmaisons commented 6 years ago

You can use d3.js to achieve that but I am not sure of the interest of such of functionality. I am not intending it to provide it in this library, as I am not considering this feature as generic enought. May by then best way would be to fork this project.

ghost commented 3 years ago

I have created a solution that i believe solves this problem.

https://github.com/napoleon-commits/vue-d3s-tree

My solution: Added a dynamic CSS computed property and include it in a <component :is="'style'" type="text/css" Component.

Hope it helps