本文主要是介绍echarts点击柱状图携带参数跳转页面,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
getBarCharts() {let that = thislet barWidth = 20let manColors = []let womanColors = []let nowTime = ''let lastTime = ''let option = {//提示框tooltip: {trigger: 'axis',formatter: function(p) {let div = `${p[0].name}<br/>${p[0].seriesName}:${p[0].value}<br/>${p[2].seriesName}:${p[2].value}`return div},axisPointer: {type: 'shadow'}},color: ['#1DD6CF', '#4eff8f'],legend: {textStyle: { fontSize: 12, color: '#fff' },itemWidth: 24,itemHeight: 15,itemGap: 15,bottom: '2%'},grid: {left: '6%',right: '2%',top: '10%'},xAxis: {data: this.xName,triggerEvent: true,silent: false,type: 'category',axisLine: {show: true,lineStyle: {color: '#00787e',shadowColor: '#00787e'}},splitLine: {show: false},axisTick: {show: false},axisLabel: {// margin: 30,fontSize: 15,color: '#FFFFFF',formatter(value){if (value.length > 6) {return `${value.slice(0, 6)}...`
这篇关于echarts点击柱状图携带参数跳转页面的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!