apache / apache/echarts

[Feature] Draggable Legends

Open
#21,615 4 comments 0 reactions 0 assignees View on GitHub
en 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?

Currently there doesn't seem to be any option for the legend items to be 'user-interactive' i.e. The chart user can't move them around, or resize the legend.

Being able to reposition the legend is useful for occasions where the legend has to be included in the Axis and when there is limited space to put the legend.

### What does the proposed API look like?

Ideally some sort of `draggable` or `userInteractive` toggle on the `Legend` class. So that you can do something like:

```js
legend: [
{
draggable: true, // <--- Like that?
orient: "vertical",
top: POS_FROM_TOP_LEGEND,
left: "2%",
itemWidth: 10,
},
]
```

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.