apache / apache/echarts

[Feature] MarkArea Gap

Open
#20,623 0 comments 0 reactions 0 assignees View on GitHub
new-feature pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### What problem does this feature solve?

Hers is a bar chart that needs to be divided into different categories based on a certain classification, each category is highlighted with a markArea, and there needs to be a gap between the markAreas in order to look good.

At this stage, a false gap can be realized by adding a border width to the markArea by `series.markArea.itemStyle.borderWidth`, but when the width is increased to 8 (which is a suitable width for look), the border can be seen at the bottom edge obviously, in order to make the stroke at the bottom edge looks disappear, an upward offset can be added to xAxis by `xAxis.offset`, but the bar item of the series doesn't have the function of upward offset.

![image](https://github.com/user-attachments/assets/53558fa1-d839-4826-84b2-5c6c7295d650)

![image](https://github.com/user-attachments/assets/2901e9b7-72d6-4d9a-bd21-ef36166bbf0a)

### What does the proposed API look like?

```
markArea: {
silent: true,
itemStyle: {
gap: 8,
borderColor: 'rgb(255,255,255)',
}
}
```

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.