采坑:
-
formatter不起作用:使用 formatter: function (params) 只能直接setOption,不能使用this.option
-
柱顶的百分比其实是一个另一截的柱,只是颜色为白色,值小于1;然后使用 formatter: function展示为百分比
renderChart () {
// 线上问题总量柱状图,按产研部门统计(如教学、服务运营)
var chart1Line = echarts.init(document.getElementById('chart1'))
if (this.caughtStatus === '1') {
// var optionChart2 = this.echarts.init(document.getElementById('allData'))
if (this.departments.restData.length !== 0) {
chart1Line.setOption({
grid: {
bottom: '25%'
},
title: {
text: '线上问题拦截率(' + this.departments.caught + '%)',