-
Notifications
You must be signed in to change notification settings - Fork 19.8k
[Bug] 在设置encode为同一个列后,热力图产生空白图像 #17279
Copy link
Copy link
Closed as not planned
Labels
bugpendingWe are not sure about whether this is a bug/new feature.We are not sure about whether this is a bug/new feature.staleInactive for a long time. Will be closed in 7 days.Inactive for a long time. Will be closed in 7 days.
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugpendingWe are not sure about whether this is a bug/new feature.We are not sure about whether this is a bug/new feature.staleInactive for a long time. Will be closed in 7 days.Inactive for a long time. Will be closed in 7 days.
Type
Fields
Give feedbackNo fields configured for issues without a type.