Page 1 of 1

X-axis looses formatter function after highslide popup close

Posted: Fri Jun 15, 2018 8:43 am
by rahulgupta811
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;
            }
    }

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

Posted: Fri Jun 15, 2018 3:04 pm
by daniel_s
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!

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

Posted: Mon Jun 18, 2018 8:30 am
by rahulgupta811
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