[Bug] 在设置encode为同一个列后,热力图产生空白图像
Version
5.3.3以及之前
Link to Minimal Reproduction
No response
Steps to Reproduce
这个例子是官网里的例子:
tooltip: {
position: "top"
},
animation: false,
grid: {
height: "50%",
top: "10%"
},
xAxis: {
type: "category",
data: ["12a", "1a", "2a", "3a", "4a", "5a", "6a", "7a", "8a", "9a", "10a", "11a", "12p", "1p", "2p", "3p", "4p", "5p", "6p", "7p", "8p", "9p", "10p", "11p"],
splitArea: {
show: true
}
},
yAxis: {
type: "category",
data: ["Saturday", "Friday", "Thursday", "Wednesday", "Tuesday", "Monday", "Sunday"],
splitArea: {
show: true
}
},
visualMap: {
min: 0,
max: 10,
calculable: true,
orient: "horizontal",
left: "center",
bottom: "15%"
},
series: [{
name: "Punch Card",
type: "heatmap",
encode: {
x:0,
y:1
},
data: [
[11, 0, 2],
[12, 0, 4],
[13, 0, 1],
[14, 0, 1],
[15, 0, 3],
[16, 0, 4],
[17, 0, 6],
[18, 0, 4],
[19, 0, 4],
[20, 0, 3],
[21, 0, 3],
[22, 0, 2],
[23, 0, 5],
]
}]
}
此时热力图可以被画出,但是如果将encode设置为同一列,则产生了空白图像,如下
option = {
tooltip: {
position: "top"
},
animation: false,
grid: {
height: "50%",
top: "10%"
},
xAxis: {
type: "category",
data: ["12a", "1a", "2a", "3a", "4a", "5a", "6a", "7a", "8a", "9a", "10a", "11a", "12p", "1p", "2p", "3p", "4p", "5p", "6p", "7p", "8p", "9p", "10p", "11p"],
splitArea: {
show: true
}
},
yAxis: {
type: "category",
data: ["Saturday", "Friday", "Thursday", "Wednesday", "Tuesday", "Monday", "Sunday"],
splitArea: {
show: true
}
},
visualMap: {
min: 0,
max: 10,
calculable: true,
orient: "horizontal",
left: "center",
bottom: "15%"
},
series: [{
name: "Punch Card",
type: "heatmap",
encode: {
x:0,
y:0
},
data: [
[11, 0, 2],
[12, 0, 4],
[13, 0, 1],
[14, 0, 1],
[15, 0, 3],
[16, 0, 4],
[17, 0, 6],
[18, 0, 4],
[19, 0, 4],
[20, 0, 3],
[21, 0, 3],
[22, 0, 2],
[23, 0, 5],
]
}]
}
Current Behavior
热力图产生空白图像
Expected Behavior
热力图应该产生类似对角线的图像
Environment
- OS:
- Browser:Chrome
- Framework:
Any additional comments?
No response
@biankaiwen It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
TRANSLATED
TITLE
[Bug] After setting encode to the same column, the heat map produces a blank image
This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.
This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!