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
877 stars 136 forks source link

why my tree renders very slow? #34

Closed xinyu7git closed 5 years ago

xinyu7git commented 5 years ago

my tree renders very slow. after flush page , it will cost 1-2s to render. Do you know why?

image

render finish: image

David-Desmaisons commented 5 years ago

1) Set a fixed height to your component 2) change the duration property to 0

xinyu7git commented 5 years ago
  1. Set a fixed height to your component
  2. change the duration property to 0

I have tried, but not work. my codes: image

KurosakiRei commented 2 years ago
  1. Set a fixed height to your component
  2. change the duration property to 0

I have tried, but not work. my codes: image

I know my reply is probably too late, but I want to provide a solution for the people who encounter the same issue after. You can try to use the inline-CSS in your "tree" element. For example, <tree :data="tree" style="height: 100vh">