[Vuejs]-How do I plot a point not exacty on points on the axis data in echarts

2👍

You can add a new data point between "A" and "B" in the x-axis data by splicing the array. For example:

option.xAxis.data.splice(1, 0, "A.5")

This will insert the new data point "A.5" at index 1 (between "A" and "B").
You also need to update the data of your series accordingly.

option.series[0].data.splice(1, 0, 16)

This will insert the value 16 at index 1 (between the value of A and B).

Please keep in mind that if you want to add multiple points you need to do the splicing for the x and y axis data for each point.

Leave a comment