Y.point
Y.point

Reputation: 51

Highstock - change tickpositioner dynamically

I made a custom tickPositioner (under xAxis), and I want to dynamically change it when zooming in. I tried to do so by adding a setExtremes event the following way:

            xAxis: {
                events: {
                    setExtremes: function () {
                        $("#container").highcharts().userOptions.xAxis.tickPositioner = function() {...};
                    }
                },

but this doesn't work.

Upvotes: 1

Views: 268

Answers (1)

Y.point
Y.point

Reputation: 51

This worked:

            xAxis: {
                events: {
                    setExtremes: function() {
                        $("#container").highcharts().xAxis[0].update({
                            tickPositioner : function () {...}
                        });
                    }
                },

Upvotes: 2

Related Questions