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

iyzzxitl  于 2023-02-04  发布在  Echarts
关注(0)|答案(1)|浏览(144)

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 :
xv8emn3q

xv8emn3q1#

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 :

相关问题