0👍
In Vue, you have to draw d3 charts on the mounted hook, rather than the created hook. You can’t draw the chart if the page is not rendered – which is what happens when you use the created hook.
mounted () {
this.add_svg() // append svg for chart
this.plot([0, 0]) // basic plot with value = [0, 0]
}
- [Vuejs]-How to run asp.net core run and vue js serve in same command window?
- [Vuejs]-Return Vue Variable or Vue Component to Laravel Blade
Source:stackexchange.com