change the coordinate value of an echarts histogram to a picture. The requirement is as follows
http://www.echartsjs.com/gall...
Code section:
var logoIcon = {
"logo1": "img/logo1.png",
"logo2": "img/logo2.png"
};
optionFour = {
title: {
x: "center",
text: "",
textStyle: {
color:"-sharp666666",
fontSize:"18"
}
},
tooltip: {
trigger: "item"
},
calculable: false,
grid: {
borderWidth: 0,
y: 80,
y2: 30
},
xAxis: {
type: "category",
show: true,
data: ["Line", "Bar", "Scatter", "Ka", "Pie", "Radar", "Chord", "Force"],
renderAsImage:true,
axisLabel: {
formatter: function (value) {
return "{"+ value + "| }\n{value|" + value + "}";
},
rich: {
Line: {
height: 40,
align: "center",
backgroundColor: {
image: logoIcon.logo1
}
},
Bar: {
height: 40,
align: "center",
backgroundColor: {
image: logoIcon.logo2
}
}
}
}
},