Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polar axis ignores custom default options #16112

OldBuddy opened this issue Jul 28, 2021 · 1 comment · Fixed by #16113

Polar axis ignores custom default options #16112

OldBuddy opened this issue Jul 28, 2021 · 1 comment · Fixed by #16113


Copy link

Expected behaviour

Polar axis should respect options set with 'Highcharts.setOptions' in case when 'yAxis' definition is array.

Actual behaviour

Default options for yAxis are ignored.

Live demo with steps to reproduce

Product version


Affected browser(s)


Copy link

Hi @OldBuddy, thanks for reporting a bug.

Related to #1053 (was fixed for a normal axis, but not for the radial axis)

Demo with a workaround:

(function(H) {
  var fireEvent = H.fireEvent,
    merge = H.merge,
    defaultOptions = H.defaultOptions,
    registerEventOptions = H._modules['Core/Foundation.js'].registerEventOptions;

  H.addEvent(H.Axis, 'init', function() {
    if (this.isRadial) {
      this.setOptions = function(userOptions) {
        var options = this.options = merge(this.constructor.defaultOptions,
          userOptions, merge(
            // if set in setOptions (#1053):
            defaultOptions[this.coll], userOptions));
        // Make sure the plotBands array is instanciated for each Axis
        // (#2649)
        if (!options.plotBands) {
          options.plotBands = [];
        fireEvent(this, 'afterSetOptions');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Successfully merging a pull request may close this issue.

4 participants