0👍
It seems that the property you are looking for is $mounted
. Provide a funtion to the key mounted
, then you can instantiate the d3 visualization.
The basics of $mounted
from the above link:
<template>
<svg width="500" height="300"></svg>
</template>
<script>
const d3 = require('d3');
export default {
mounted: function() {
// this.#el - is the root element in <template>
// in this case it is <svg> tag
d3.select(this.$el)
.append('circle')
.attr('cx', '250')
.attr('cy', '150')
.attr('r', '100')
}
}
</script>
- [Vuejs]-How to pass a string with double quoutes as property in VueJS?
- [Vuejs]-Vue router firebase auth guard doesn't work
Source:stackexchange.com