Get started with vue-echarts CDN
MIT licensed
Vue-Echarts is a Vue.js component library for integrating ECharts charts into Vue projects.
Tags:- ECharts
- Vue.js
Stable version
Copied!
How to start using vue-echarts CDN
<template>
<div id="app">
<div id="main" style="width: 600px; height: 400px;"></div>
</div>
</template>
<script>
import Echarts from 'vue-echarts';
import 'echarts/lib/chart/bar';
import 'echarts/lib/component/title';
import 'echarts/lib/component/tooltip';
export default {
components: {
Echarts,
},
data() {
return {
options: {
title: {
text: 'ECharts Bar Chart',
},
tooltip: {},
xAxis: {
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
},
yAxis: {
data: ['Product A', 'Product B', 'Product C'],
},
series: [
{
data: [10, 52, 200, 334, 390],
type: 'bar',
barWidth: '60%',
},
],
},
};
},
mounted() {
this.$nextTick(() => {
this.$refs.main.echarts.setOption(this.options);
});
},
};
</script>
<style>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
#main {
width: 100%;
height: 100%;
}
</style>
Copied!
Copied!
All versions
3.1.3
4.0.0
4.0.0-beta.0
4.0.0-beta.1
4.0.1
4.0.2
4.0.3
4.0.4
4.1.0
5.0.0-beta.0
6.0.0
6.0.0-alpha.1
6.0.0-alpha.2
6.0.0-alpha.3
6.0.0-alpha.4
6.0.0-alpha.5
6.0.0-beta.1
6.0.0-beta.2
6.0.0-beta.3
6.0.0-beta.4
6.0.0-beta.5
6.0.0-beta.6
6.0.0-beta.7
6.0.0-rc.1
6.0.0-rc.2
6.0.0-rc.3
6.0.0-rc.4
6.0.0-rc.5
6.0.0-rc.6
6.0.1
6.0.2
6.0.3
6.1.0
6.2.0
6.2.1
6.2.2
6.2.3
6.2.4
6.3.0
6.3.1
6.3.2
6.3.3
6.4.0
6.4.1
6.5.0
6.5.1
6.5.2
6.5.3
6.5.4
6.5.5
6.6.0
6.6.1
6.6.10
6.6.2
6.6.3
6.6.4
6.6.5
6.6.6
6.6.7
6.6.8
6.6.9
6.7.0
6.7.1
6.7.2
6.7.3
7.0.0
7.0.0-beta.0
7.0.1
7.0.2
*** 7.0.3