Change categoryAxis labelStep dynamically

0 Answers 47 Views
Charts
J
Top achievements
Rank 1
Iron
Iron
J asked on 12 Jul 2021, 07:19 AM | edited on 12 Jul 2021, 07:27 AM

Hi,

I have a chart with a categoryAxis given like this:


      type: 'date',
      baseUnit: 'minutes',
      baseUnitStep: 15,
      labels: {
        format: 'H',
        step: 4,
      }

The data are per 15 minutes, so the baseUnitStep is per 15 minutes as well. The labels are per 4 base unit steps.

What I need is, when user narrows the screen, to set labels step to e.g. twice, so the label would'n be placed per 4 but per 8 base unit steps.

I tried to reset the labels.step property, also the labels property itself, but there is still no difference in the graph appearance. Should I try to reset the complete categoryAxis or refresh it somehow? Or is there any simpler solution?

Thanks in advance.

J

No answers yet. Maybe you can help?

Tags
Charts
Asked by
J
Top achievements
Rank 1
Iron
Iron
Share this question
or