apache / apache/echarts

折线图显示最大值最小值,折点太近label会重叠(line label overlap)

Open
#15,219 3 comments 0 reactions 1 assignee Claimed by @Ovilia View on GitHub
bug pending
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'},
}
],
};
```

![image](https://user-images.githubusercontent.com/31722751/123091626-2ce1b000-d45c-11eb-8df2-5da4871b39d5.png)

### What is expected?
label不重叠,希望垂直方向上能有偏移

### What is actually happening?
label重叠

---
显示最大值最小值时,hideOverlap和moveOverlap没有起到作用
[](url)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.