apache / apache/echarts

Annotation editing support in toolbox

Open
#10,020 18 comments 1 reaction 0 assignees View on GitHub
en new-feature topic: label
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 is no easy way for a user to add annotations to a chart. The data can be initialised with labelled points but for my use case, I need my data analysts to be able to highlight a chart area and directly add annotations in a similar way to http://demo.blacklabel.pl/ (see the buttons in the top right: text, rectangle)

### What does the proposed API look like?
1. The toolbox would be able to be initialised with addAnnotations: true - this would add buttons in the top right corner similar to http://demo.blacklabel.pl/

2. When annotations are added, an event would be triggered with a payload like this:
```
{
annotationAdded: { annotationType: 'rectangle', annotationText: 'blah', annotationXMin: 123, annotationXMax: 150, annotationYMin: 100, annotationYMax: 200 },
allAnnotations: [{ annotationType: 'rectangle', annotationText: 'blah', annotationXMin: 123, annotationXMax: 150, annotationYMin: 100, annotationYMax: 200 }]
}
```

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.