echarts可视化数据-折线图
非常详细的echarts可视化折线图,
新手必看
1.效果图
代码如下
//设置容器
<template>
<div :class="className" :style="{height:height,width:width}" />
</template>
//引用echarts文件
import echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme
export default {
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
height: {
type: String,
default: '350px'
},
},
data() {
return {
chart: null,