echarts [Bug] brushLink and dataZoom not working as expected

qxsslcnc  于 5个月前  发布在  Echarts
关注(0)|答案(2)|浏览(42)

Version

5.4.2

brushLink + dataZoom

Steps to Reproduce

  1. Create a chart with two plots, each corresponding to a different series. Enable toolbox dataZoom and brush.
  2. Zoom in on the the point in the middle in one of the charts.
  3. Brushselect the point.

Current Behavior

The single brushSelected point will correspond to the first point in the other plot, i.e. the points are mapped by index of all currently visable points in each plot.

Expected Behavior

The single brushSelected point should correspond to the point with the same index in each series, i.e. with the same value of 'x' in the given example.

Environment

- OS: Windows
- Browser: Microsoft Edge
- Framework: none

Any additional comments?

No response

b0zn9rqh

b0zn9rqh1#

As a fix I would suggest giving the option to brushLink on a dataset dimension, i.e. link points of other series where the value of the specified dimension is equal. In my usecase (as in many others i can imagen), I need to plot different metrics over time, such that linking on the time dimension would solve the usecase without imposing performance problems (since the lookup can be restricted to the visable points only and the data is already in use anyways).
Additionally, for specific usecases, it would be possible to create a new dimension for linking and have full control over the data items that should get linked.

I will open a new feature request with detailed examples and post the link here when I'm done.

bvjxkvbb

bvjxkvbb2#

@Ovilia@pissang@100pah
I fixed this issue. Should I just open a pull request?

相关问题