Use jsx, not d3 selections - it's much simpler when you learn it. You also don't have to watch the data updates and write renderLine and updateLine methods, you just write the render function and deal with reactive data and shadow DOM
I would write an article about d3, Vue and jsx, but I have a little experience in writing and bad english
I make charts with d3 in Vue almost every day and here is some of my best practices:
renderLine
andupdateLine
methods, you just write therender
function and deal with reactive data and shadow DOMI would write an article about d3, Vue and jsx, but I have a little experience in writing and bad english
Per your suggestion I updated the example to just pull the dependent d3 files.
Definitely agree on the recommendation to pull in only those dependent modules.
Regarding JSX I assume that is easier / harder based on your familiarity with the syntax.
Oh and of course some features are simpler with d3 selections - animations and transition for example
You haven't to use JSX, you can use vue templates, but JSX is a little more flexible. The idea is to use
Instead of
I think html/svg is more readable