| | |
| | | setOption(opt) { |
| | | this.$options.chart.setOption(opt); |
| | | this.$options.chart.on('click', (params) => { |
| | | console.log(params) |
| | | let name = params.name; |
| | | checkboxs.sbzt.map(item => { |
| | | if (item.label == name) { |
| | | console.log(item.value) |
| | | this.toParentPage(item.value) |
| | | } |
| | | }) |
| | |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | type: 'none' |
| | | }, |
| | | formatter: function (params) { |
| | | return params[0].name + ' : ' + params[0].value |
| | | type: 'shadow' |
| | | } |
| | | }, |
| | | xAxis: { |
| | |
| | | }, |
| | | borderRadius: [0, radius, radius, 0], |
| | | }, |
| | | barWidth: radius, |
| | | barCategoryGap: "0%", |
| | | data: data |
| | | }, |
| | | { |
| | | name: '', |
| | | type: 'pictorialBar', |
| | | barCategoryGap: "0%", |
| | | symbolPosition: 'end', |
| | | symbolSize: [radius, radius], |
| | | zlevel: 2, |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | label: { |
| | | show: true, |
| | | position: 'insideRight', |
| | | fontSize: chartFontsize(18), |
| | | color: '#021750' |
| | | }, |
| | | itemStyle: { |
| | | color: function (params) { |
| | | return dataColor[params.dataIndex]; |
| | | }, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)', |
| | | shadowBlur: 10, |
| | | shadowOffsetX: -2 |
| | | }, |
| | | color: "#26B2E8", |
| | | data: data |
| | | }, |
| | | { |
| | | name: '', |
| | | type: 'bar', |
| | | barCategoryGap: "0%", |
| | | barGap: '-100%', |
| | | barWidth: radius, |
| | | data: maxData, |
| | | itemStyle: { |
| | | color: function (params) { |
| | | return bgColor[params.dataIndex]; |
| | | }, |
| | | }, |
| | | }, |
| | | ] |
| | | }; |