Newer
Older
</template>
<script>
// require modules
/* eslint-disable no-unused-vars */
const _ = require('lodash');
watch: {
chart: {
handler: function () {
Plotly.react(
this.$refs[this.chart.id],
this.chart.traces,
this.chart.layout
);
},
deep: true
}
},
mounted: function () {
Plotly.plot(this.$refs[this.chart.id], this.chart.traces, this.chart.layout);
}
}
</script>
<style scoped>
.mainContent {
padding: 20px;
}
</style>