Add markLine to the chart for real-time change of the progress bar, which cannot be realized

Recently, there is a need to control the position of the markline displayed on the chart in order to realize the dragging progress bar.

My idea is to assign the value of the progress bar to the markline, but there is an attribute feature that is ignored, which makes the markline unable to move. I found out after a long time of searching.

The assignment statement of markLine is: data: [{ xAxis: b }], if b is a number, it means progressing to the bth data on the x-axis, if it is a string, it means changing to the value on the x-axis ! ! ! ! !

Who can think of the number represented by the number, the string is the corresponding value

Guess you like

Origin blog.csdn.net/weixin_45898996/article/details/129725447