echarts柱状图上增加icon图标
效果图
基于echarts5.3.2版本
以下是option中的内容
getData(){
let datas={
ws:{
jz:25,
sz:30
},
fq:{
jz:25,
sz:20
},
zy:{
jz:25,
sz:27
},
yg:{
jz:25,
sz:18
},
zf:{
jz:25,
sz:40
},
gys:{
jz:25,
sz:32
},
xfz:{
jz:25,
sz:21
},
sq:{
jz:25,
sz:15
},
}
for(let index in datas){
console.log(datas[index],212121212121)
let obj=datas[index]
if(obj.sz>=obj.jz){
this.arr.push({
value: obj.sz,
//symbol内容是base4的icon图标
symbol:"image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAAGgZJREFUeF7tXQuQFcW5/v7ZXTBKSF0vEkxijCjsmbMK6pLAmbMaNA8J5qFWEKzKvXVvUBIfeeArmtIEoxUNJj4SIYmKuZWkKhCT4NVI3kCEMwcMhEDcM2dBMcYrIlhWBcEAuzv/rTm7EEUe0z3d8zo9VZQL9v/6/v62e3q6/yaYxyBgEDgkAmSwMQgYBA6NgCGI6R0GgcMgYAhiuodBwBDE9AGDgBwCZgSRw81INQkChiBNkmgTphwChiByuBmpJkHAEKRJEm3ClEPAEEQONyPVJAgYgjRJok2YcggYgsjhFlqKN511HPp6O2BZRfTRCSAeDmA4CMOB4GcaDsbbBv7e+BM8O8DYAcI/AN4B0MDfG/9OO9DKz8P3a2ht66YxK7aHdsY0FEbAEEQYsoMLvIEI/egAcRGgDgDHKTJxKDXbAe4GUw0t6DbEUYu2IYgknlyfOA7U+j4wnw3G2QBOlFSlS+w5EJ4A0RPgviepsHqDLkN51msIEiK7XC+/FcAE+PxeECY0CEF4ewjR9DRhvNQgDGMNLPoTgDVUqLyaHgfT6YkhyGHywrXyVBBfAOBCACPSmUJpr14GsBhMj1CxskRaS84FDUEOSDD3dI2H7+8jxfic539feOsbZLGsR6h9ZfCzeQYRMAQBwD2TR8DfeyEIF4Axtal7B2EJGI/AGrKY2pcHo0xTP01NEN7snIj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N5545Y6Dccq61sGdF2tTE3o78iDAI3Be2trJOep6hza/d6kTyLQBfdVaAuLVIGO1HAF9TEMhKoGdHWDaQTn78Tg38m58T7VApoulOAgosWA1gHO7gRrjvI+BsQNQoiiNxTiOwFwXgcyCkhuFizBBl4Lw3hSMVypg/BJ9fB9lyg8F1rISYkgE0qYiuV7MgDEIdgZBtDIBewvvBfMukDEGwhhlS2oDP7nmICAC8dk0uLFiMfgEC+AimIrut9YXlUBcAtT3azZl9hzQ2l3NnBOBBFAh7l0GyMDhrPtN1Pw3eHEA5j2YINXoG2BWd4MGDFIv7Rpyd/CArk0SEUj3DOe00LzbLMgAlIFDZwJ4s/sh9U3Nn2d+lL1DMz98CDzl/xv8NMAN0JGG3BXCq8T/ByFAcAvUs3f9AAAAAElFTkSuQmCC"
})
}
}
this.option={
color: ["#21D19C"],
legend: {
data: ["高于行业均值", "低于行业均值", "行业均值"],
align: "right",
right: 10,
// bottom:280,
textStyle: {
color: "#333333",
},
// itemWidth: 10,
// itemHeight: 10,
// itemGap: 35,
},
tooltip: {
trigger: "axis",
axisPointer: {
// 坐标轴指示器,坐标轴触发有效
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
},
formatter: function (value) {
for (var i = 0; i < value.length; i++) {
return (
value[0].name +
":" +
value[0].value+
'<br/>'+
value[1].seriesName +
":" +
value[1].value
);
}
},
},
grid: {
top: 30,
left: "2%",
right: "2%",
bottom: "3%",
containLabel: true,
},
xAxis: {
data: [
"温室气体排放",
"废弃物和污染物排放",
"资源使用",
"员工",
"政府",
"供应商",
"消费者",
"社区",
],
axisLine: {
//y轴线的颜色以及宽度
show: false,
lineStyle: {
color: "#FAFAFA",
width: 1,
type: "solid",
},
},
axisLabel: {
//y轴文字的配置
rotate: 40,
textStyle: {
color: "#404361",
},
// formatter: '{value} %'//y轴的每一个刻度值后面加上‘%’号
},
},
yAxis: [
{
type: "value",
name: "Precipitation",
// min: 0,
// max: 100,
axisLabel: {
// formatter: "{value}.00%",
textStyle: {
color: "#404361",
},
},
axisLine: {
//y轴线的颜色以及宽度
show: false,
lineStyle: {
color: "#FAFAFA",
width: 1,
type: "solid",
},
},
},
],
series: [
{
name:'高于行业均值',
data: [30,20,27,18,40,32,21,15],
type: "bar",
barWidth:'15%',
label: {
// show: true, // 开启显示
position: "top", // 在上方显示
distance: 20, // 距离图形元素的距离。当 position 为字符描述值(如 'top'、'insideRight')时候有效。
verticalAlign: "middle",
textStyle: {
// 数值样式
color: "black",
fontSize: 12,
},
},
itemStyle: {
normal: {
// color: '#00C087'
color:function (value){
if(value.data>=25){
return '#00C087'
}else{
return '#FE6E55'
}
}
}
},
},
{
name:'行业均值',
data: [25,25,25,25,25,25,25,25],
type: "bar",
barWidth:'15%',
label: {
// show: true, // 开启显示
position: "top", // 在上方显示
distance: 20, // 距离图形元素的距离。当 position 为字符描述值(如 'top'、'insideRight')时候有效。
verticalAlign: "middle",
textStyle: {
// 数值样式
color: "black",
fontSize: 12,
},
},
itemStyle: {
normal: {
color: '#E8E8E8'
}
},
},
{
name:'低于行业均值',
data: [],
type: "bar",
barWidth:'0%',
itemStyle: {
normal: {
color: '#FE6E55'
}
},
},
//重点是下边的代码
{
name: "glyph",
type: "pictorialBar",
barGap: "-100%",
symbolPosition: "end",
symbolSize: 30,
//symbolOffset可以控制icon的定位
symbolOffset: ["-100%", "-108%"],
//this.arr格式[{value:'数值',symbol:’image://‘+'base64icon图标'}]
data: this.arr,
},
],
barWidth: 40,
}
},