折线图显示最大值最小值,折点太近label会重叠(line label overlap)
- Dominant language
- TypeScript
- Stars
- 67.3k
- Forks
- 19.8k
- Avg merge
- 11d 14h
- Merged PRs (30d)
- 8
Description
### Version
5.0.0
### Steps to reproduce
```ts
option = {
title: { left: "center", text: "" },
tooltip: { trigger: "axis", show: true, confine: true, enterable: true },
legend: {
data: [
"推荐底部",
"评论底部",
],
show: true,
},
xAxis: [
{
type: "category",
boundaryGap: true,
data: [0, 1, 2, 3, 4, 5, 6, 7]
},
],
yAxis: [
{
type: "value"
},
],
series: [
{
type: "line",
name: "推荐底部",
data: [0.9583, 0.9583, 0.9631, 0.9645, 0.9629, 0.9637, 0.9627, 0.9636],
xAxisIndex: 0,
yAxisIndex: 0,
smooth: true,
itemStyle: { color: "#F06D4F" },
lineStyle: { color: "#F06D4F", type: "solid" },
markPoint: {
data: [
{ type: "max", name: "最大值" },
{ type: "min", name: "最小值" },
],
label: { textStyle: { color: "black" } },
itemStyle: { color: "transparent" },
},
label: { show: false },
labelLayout: { hideOverlap: true,moveOverlap: 'shiftY' },
},
{
type: "line",
name: "评论底部",
data: [0.9570, 0.9941, 0.9937, 0.9937, 0.9947, 0.9927, 0.9838, 0.9924],
xAxisIndex: 0,
yAxisIndex: 0,
smooth: true,
markPoint: {
data: [
{ type: "max", name: "最大值" },
{ type: "min", name: "最小值" },
],
label: { textStyle: { color: "black" } },
itemStyle: { color: "transparent" },
},
label: { show: false },
labelLayout: { hideOverlap: true, moveOverlap: 'shiftY'},
}
],
};
```

### What is expected?
label不重叠,希望垂直方向上能有偏移
### What is actually happening?
label重叠
---
显示最大值最小值时,hideOverlap和moveOverlap没有起到作用
[](url)
Contributor guide
Assessment
This issue has not been assessed yet.