1.echarts使用
2.漸變
3.網(wǎng)格線隱藏仪际、顯示
https://blog.csdn.net/lhove/article/details/106623536
網(wǎng)格線介紹
https://blog.csdn.net/weixin_40562026/article/details/85071370
線的顯示岁诉、隱藏
4.標(biāo)題
5.legend圖例的顯示與隱藏
legend
6.餅圖如何添加指示百分比
文字百分比
7.顏色
和data順序一致
https://jingyan.baidu.com/article/7f766dafff9b374101e1d093.html
顏色
8.自適應(yīng)resize
resizeChart() { this.echart ? this.echart.resize() : '' }
mounted() { //resize 改變圖表尺寸邮利,在容器大小發(fā)生改變時需要手動調(diào)用(因為側(cè)邊欄是可以收縮的彰阴,所以這里圖表根據(jù)是否收縮來改變圖表尺寸)
window.addEventListener('resize', this.resizeChart) },
//銷毀 防止內(nèi)存泄漏destroyed() { window.removeEventListener('resize', this.resizeChart) }
chartInit() {
this.chart = echarts.init(this.$refs["chart"]);
},
resize() {
this.chart.resize();
},
9.傳單位
數(shù)據(jù)單位
10.echarts社區(qū)實例
11.echarts5.0
12.換行
Echarts 坐標(biāo)軸換行 \n
13.echarts數(shù)據(jù)變化后脐恩,圖表不更新
14.封裝
15.echarts dom
let myChart = echarts.getInstanceByDom(document.getElementById(chartDom))
16.echarts 折線起點(diǎn)從最左端開始
17.dataset對象格式
https://echarts.apache.org/examples/zh/editor.html?c=dataset-simple1
18.echarts 顯示順序
https://blog.csdn.net/weixin_31190007/article/details/114167334
19.echarts圖表導(dǎo)出圖片
https://blog.csdn.net/workhard0905/article/details/123128888
20.暫無數(shù)據(jù)
if(!xAxis.length) {
option.title = {
text: '暫無數(shù)據(jù)',
left: 'center',
top: 'center',
fontSize: '35',
}
}
if (!xAxis.length) {
option.title = {
x: 'center',
y: 'center',
text: '{a| ' + '}',
textStyle: {
rich: {
a: {
backgroundColor: {
image: require('../../public/icon—noData.jpg')
},
height: '115',
width: '10'
}
}
}
}
} else {
option.title = {
text: ''
}
}