0.1.9 • Published 2 years ago
simple-echart v0.1.9
simple-echart
vue3 echarts
import { createApp } from 'vue'
import simpleEchart from 'simple-echart'
import App from './App.vue'
const app = createApp(App);
app.use(simpleEchart)
<template>
<simple-echart :options="options" :data="chartData"></simple-echart>
</template>
<script>
import { ref } from 'vue'
export default {
name: 'left-a',
setup() {
const chartData = ref([
["year", "in", "out"],
["2019", 120, 130],
["2020", 222, 200],
["2021", 326, 280]
])
const options=ref({ "chartGrid": {}, "chartLegend": {}, "chartColor": [], "chartXAxis": {}, "chartYAxis": {}, "chartSeries": [ "bar", "bar", "line" ], "chartSeriesExtend": {} })
return {
chartData,
options
}
}
}
</script>