joaoFerreira
Posts: 6
Joined: Thu Oct 21, 2021 1:24 pm

ISSUE: Update yAxis using update method.

I have an usecase that I didn't understand.
I was trying to update yAxis min and yAxis max values, using the API update() method and it doesn't work. It seems the chart tries to respect the old y scale instead of my new values.

Sample:
https://jsfiddle.net/joaoMFerreira/kdn79ufs/15/

Thanks in advance,
João Ferreira
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: ISSUE: Update yAxis using update method.

Hi,

Welcome to our forum and thanks for contacting us with your question!

These topics should help you to get the answer:

Highstock YAxis min max not working
Highcharts yXis min/max value don't work

Let me know if you have any further questions!
Regards!
Magdalena Gut
Developer and Highcharts Support Engineer
joaoFerreira
Posts: 6
Joined: Thu Oct 21, 2021 1:24 pm

Re: ISSUE: Update yAxis using update method.

Thank you magdalena, I was capable to figure it out.
Now I'm calculating the tickInterval and every tickPosition by myself, before calling update().

I'ld like to suggest an idea... a new parameter on update() that re-renders Axis , or just run it when we choose to do an update with a redraw.

My expectation was to have the same behaviour on an update with redraw(true), as a create() because my options Obj don't have any tick configuration. So I was expecting it just merges the initial Obj with my new Obj and it redraws everything.

Once more, thank you.
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: ISSUE: Update yAxis using update method.

Hi,

That's great to hear!

If you like you can post this idea in our user voice service: https://highcharts.uservoice.com/forums ... script-api or create a feature request on github.

Feel free to ask any further questions!
Regards!
Magdalena Gut
Developer and Highcharts Support Engineer

Return to “Highcharts Usage”