Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I used to use D3.js as the default go-to for data. Now I start with Vue.js, and use D3.js only inside some components when I need, animations between transitions.

D3.js, as someone else already noted, is "jQuery for data". And yes, it has its good parts, but the same as for jQuery) the problem is with:

- mixing static HTML/SVG with generated

- no modularization (every modularization is custom)

For the latter, while it may not be a big deal for small projects, for bigger it sucks.

For big stories, I created a game in D3.js. Modularization was... well, argument why I rewrote it a few years later to Vue.js.



Am I right in thinking that you are using Vue.js to create/delete/update the DOM elements? If so, how does performance typically compare to using the usual D3 enter()/exit() etc methods for that?


I used to do performance-sensitive things in D3.js (e.g. many moving dots).

For projects with Vue.js, the performance was not my concern.

In any case, if needed, you can use D3.js rendering within a Vue component.


Thanks, that makes sense. I'm currently doing D3.js rendering within a Vue component. I suspect that my code will be cleaner if I switch to the Vue.js constructs for managing the DOM, rather than D3's enter()/exit()/update(), so even if the performance is ultimately the same, there should still be a maintainability win.

It sounds like it's worth me doing a Vue implementation and running some benchmarks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: