I added the line
component, but I'm still encountering issues. I set up my project using vue cli 3
and referred to this guide, but I can't locate the vue.config.js
file in my project. Therefore, I manually created a vue.config.js
and placed it in the same directory as babel.config.js
, which resulted in breaking my router.
Below is my line chart code:
<template>
<v-chart :options="options"/>
</template>
<script>
import ECharts from 'vue-echarts/components/ECharts'
import 'echarts/lib/chart/line'
export default {
name: 'line-chart',
components: {
'v-chart': ECharts
},
props: {
data: Object
},
data () {
return {
options: {
xAxis: {
type: 'category',
data: this.data.xAxis
},
yAxis: {
type: 'value'
},
series: [{
type: 'line',
data: this.data.values
}],
animationEasing: 'linear'
}
}
}
}
</script>