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.
- [Vuejs]-How to make a condition to add/remove data param in Vue?
- [Vuejs]-Why can't child components get the data from parent component?
Source:stackexchange.com