apache / apache/echarts

Allow to set the color of markLine symbols

Open
#14,257 3 comments 1 reaction 0 assignees View on GitHub
en new-feature topic: marker waiting-for: community
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### What problem does this feature solve?
Currently it is not possible to set the color of the symbols of a markLine (different to the line-color)

![image](https://user-images.githubusercontent.com/20422904/107511285-91832900-6ba5-11eb-95ef-d953e8b6bea6.png)

### What does the proposed API look like?
In addition to setting the symbol, we could add a `symbolColor`, e.g.

```
markLine: {
data: [
[{
name: 'start',
coord: [0, 50],
lineStyle: {
color: 'blue'
},
symbol: 'rect'
symbolColor: 'blue'
}, {
name: 'end',
coord: [1, 500],
symbol: 'rect'
}]
]
}
```

* Reference to [MarkLine API docs](https://echarts.apache.org/en/option.html#series-line.markLine.data.0.symbol)
* related [Stackoverflow question: How to change the symbol color of a mark line?](https://stackoverflow.com/questions/66102322/how-to-change-the-symbol-color-of-a-mark-line)

Contributor guide

Open the contributing guide

Research direction

Start with the MarkLine API documentation, especially the series-line.markLine.data.0.symbol entry and the proposed markLine configuration in the issue. Trace how markLine symbols and lineStyle colors are handled, then verify that symbol color can be configured independently and that the documented API behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.