apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.35k stars 19.61k forks source link

Ability to add markers/selectors to a chart by end user. #18160

Open ragava28 opened 1 year ago

ragava28 commented 1 year ago

What problem does this feature solve?

Ability to add multiple markers/selectors in the chart by the end user at a specific point similar to brush functionality , and moving them by dragging. current brush functionality allows us to select only a range of points.

Example scenario of it . https://stackoverflow.com/questions/75064009/customizing-echart-horizontal-select-brush-functionality-to-select-single-point

What does the proposed API look like?

Similar to brush functionality (Horizontal & Vertical selection )

  1. A button in the toolbox to enable the selector.
  2. after adding selectors/annotations to the chart, an event to capture selectors :
helgasoft commented 1 year ago

Look at this example.
By clicking twice on the chart, you will get two points pointInGridA and pointInGridB. Then you could add a MarkArea between their X-coordinates. It will look exactly like the yellow area in your example: image