本来以为很麻烦,其实只是修改了一个属性值 :symbol:'triangle'
option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'none'
},
formatter: function (params) {
return params[0].name + ': ' + params[0].value;
}
},
xAxis: {
data: ['驯鹿', '火箭', '飞机', '高铁', '轮船', '汽车', '跑步', '步行', ],
axisTick: {show: false},
axisLine: {show: false},
axisLabel: {
textStyle: {
color: '#e54035'
}
}
},
yAxis: {
splitLine: {show: false},
axisTick: {show: false},
axisLine: {show: false},
axisLabel: {show: false}
},
color: ['#e54035'],
series: [{
name: 'hill',
type: 'pictorialBar',
barCategoryGap: '40%',
symbol: 'triangle',
itemStyle: {
normal: {
opacity: 0.5
},
emphasis: {
opacity: 1
}
},
data: [123, 60, 125, 128, 122, 122, 100, 122],
z: 10
}, {
name: 'glyph',
type: 'pictorialBar',
barGap: '-100%',
symbolPosition: 'end',
symbolSize: 50,
symbolOffset: [0, '-120%'],
}]
};