highcharts-react
highcharts-react copied to clipboard
Missing line segment when updating the series
Hi,
I'm trying to plot a horizontal line using multiple series with a start_position and an end_position on the x-axis.
However, the entire line I'm getting missing some parts of the segments
For example,
the line segement (14,30) is missing in the graph below

when I print out the chartRef I found that
chart.series has a length of 5

chart.userOption.series has length of 6

This situation happens when I call setCharOptions to switch between different graphs like the one above,
which means that one of the line segments is missing when I call setChartOptions
I had this issue before, and I followed this issue to sort my line segments based on the value of start_position.
However, this time this issue happened again, and I'm not sure where I possibly did wrong.
I will post an online editor to reproduce the issue if needed.
Thank you for your time!
Hi @whtitefall,
Thank you for contacting us!
The problem can be related to data mutations, so please try to disable the allowMutatingData option.
If that doesn't help, please reproduce the issue in some online code editor.
API Reference: https://api.highcharts.com/highcharts/chart.allowMutatingData
Hi,
I think I found the reason, the problem caused by the linkedTo keyword,
if I'm not using the linkedTo keyword on the series, the error won't happen.
You should be able to use the linkedTo property without any errors, so please add more information if you want to fully solve the problem.
Closed due to inactivity.