rahulgupta811
Posts: 2
Joined: Mon Jun 11, 2018 7:20 am

X-axis looses formatter function after highslide popup close

I set a user function on formatter for x-axis in a scrollable bar chart.
When I open the chart on highslide popup, i customise that formatter function with new code, and when i close the hs popup and scroll the chart, the formatter fucntion does not hold the same code.

Can I access the xaxis values and formatter function under setextreme events of chart axis.

Code: Select all

setExtremes: function (
                chartOptions.xAxis.labels.formatter = function(){
                    var linkx = this.value;
                    return linkx;
            }
    }
daniel_s
Posts: 753
Joined: Fri Sep 01, 2017 11:01 am

Re: X-axis looses formatter function after highslide popup c

hi rahulgupta811,

Thank you for contacting us and welcome on forum.
Could you provide me with minimal working copy (e.g JSFiddle, Codepen) of a project where the problem occurs? It would be much convenience for me to see the code and debug it by myself.

Best regards!
Daniel Studencki,
Highcharts Developer
rahulgupta811
Posts: 2
Joined: Mon Jun 11, 2018 7:20 am

Re: X-axis looses formatter function after highslide popup c

I debugged it myself.
The problem was "renderTo" is set to hs div on expand, but were not reset to original container after closing hs popup.

The formatter function uses "renderTo" for chart to be displayed in different elements. and this was changing each time I scroll the chart horizontally.

Thanks for your concern daniel_s. :D

Return to “Highcharts Usage”