Hello BananCoins!
Thanks for contacting us with your question!
You based your chart configuration on variables made with
var constructor, which are hoisted. That's why you could use that variable in the chart configuration above variables declaration. It is not a good habit to do this in this way. I suggest you use a axis
update method with new array of ticks passed to
tickPositions/tickPositioner property. The update method has a built-in redraw logic, which will draw a chart after its call. You can check it in the demo below.
Demo: https://jsfiddle.net/BlackLabel/1etbuv75/
API Reference: https://api.highcharts.com/class-refere ... xis#update
Let me know if you have any further questions.
Best regards!