echarts 对比柱状图 独立颜色 圆角边框 隐藏X坐标
作者:互联网
1 option = { 2 grid: { 3 top: '3%', 4 left: '3%', 5 right: '3%', 6 bottom: '6%', 7 containLabel: true 8 }, 9 tooltip: { 10 trigger: 'axis', 11 }, 12 xAxis: [ 13 { 14 type: 'category', 15 axisTick: { show: false }, 16 axisLine:{show:false}, 17 }, 18 ], 19 yAxis: [ 20 { 21 type: 'value', 22 axisTick: { show: false }, 23 axisLine:{show:false}, 24 splitLine:{ 25 show:true, 26 lineStyle:{ 27 type:'dashed' 28 } 29 } 30 } 31 ], 32 series: [ 33 { 34 name: 'Rainfall', 35 type: 'bar', 36 label: { 37 show: true, 38 position: 'inside', 39 formatter: '{c}\n\n{b}' 40 }, 41 data: [ 42 { value: 1548, name: '小红-语文' }, 43 { value: 775, name: '小红-数学' }, 44 { value: 679, name: '小红-英语'} 45 ], 46 itemStyle:{ 47 emphasis: { 48 barBorderRadius: [9,9,0,0], color:bgcol[0] 49 }, 50 normal: { 51 barBorderRadius: [9,9,0,0], color:bgcol[0] 52 } 53 }, 54 }, 55 { 56 name: 'Evaporation', 57 type: 'bar', 58 label: { 59 show: true, 60 position: 'inside', 61 formatter: '{c}\n\n{b}' 62 }, 63 data: [ 64 { value: 679, name: '小雷-语文' }, 65 { value: 1548, name: '小雷-语文' }, 66 { value: 775, name: '小雷-语文' } 67 ], 68 itemStyle:{ 69 emphasis: { 70 barBorderRadius: [9,9,0,0],color:bgcol[1] 71 }, 72 normal: { 73 barBorderRadius: [9,9,0,0],color:bgcol[1] 74 } 75 }, 76 }, 77 ] 78 };
标签:圆角,bgcol,name,show,barBorderRadius,value,柱状图,type,echarts 来源: https://www.cnblogs.com/taolingyue/p/16525640.html