Hello, welcome to our forum and thanks for contacting us with your question!
The first chart differs from the second one because you are using the addPoint function In the wrong way.
when you check the API reference:
https://api.highcharts.com/class-refere ... s#addPoint
the
addPoint function allows you to add single point to the function. Whereas you are trying to add a series of points at once.
What you can do, is to wrap all of the objects into the array, and using the forEach function add all of the points one by one.
The solution would look something like this:
Code: Select all
let array = [] // ... array of points, that you want to add
array.forEach(point => {
Map.series[0].addPoint(point, false);
})
when you check the API, you can notice, that the addPoint function takes such parameters: addPoint(options [, redraw] [, shift] [, animation] [, withEvent])
where the second parameter is the redraw property. setting it to false will prevent redrawing the chart the number of times equal to the length of the array, and improve performance. Then you can call the chart.redraw() at the end, to apply the changes.
Let me know if that solution works for you, and in case of any further questions don't hesitate to contact us again!
Kind regards,