[Vuejs]-Transform DOM Elements into Vue.js Components

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.

This is a good set of example

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>

Leave a comment