JamesW
Posts: 31
Joined: Wed Feb 03, 2021 3:33 pm

Navigator column series not stacking

Fri Sep 15, 2023 10:34 am

Hi

I have a chart with multiple column and line series but I'm struggling to get the columns to stack within the navigator, are you able to tell me what option would control this?

I'm using TypeScript and adding the navigator series to an NavigatorSeriesOption[ ] but there doesn't seem to be any stacking option in that.

Within my default options I've also tried:

Code: Select all

   navigator: {
      series: {
         stacking: 'normal',
         type: 'column',
      },
   },
But this has no affect to the stacking option within the chart object of the navigator column series.

Thanks

J.

JamesW
Posts: 31
Joined: Wed Feb 03, 2021 3:33 pm

Re: Navigator column series not stacking

Fri Sep 15, 2023 12:52 pm

Maybe I should add that I am building the navigator series myself and add them to the chart via chart.update.

I can see that all the navigator series are there, just the columns don't stack and in the chart object, the chart series has stacking: 'normal' set but the navigator series have stacking: undefined.

JamesW
Posts: 31
Joined: Wed Feb 03, 2021 3:33 pm

Re: Navigator column series not stacking

Fri Sep 15, 2023 1:09 pm

I've managed a short term fix.

It wouldn't allow me to add the stacking option on the series as it was typed as NavigatorSeriesOptions.

I've set it to 'any' for now so I can add stacking: 'normal' and that works.

What is the correct type to use for a column navigator series?

kamil.k
Posts: 419
Joined: Thu Oct 06, 2022 12:49 pm

Re: Navigator column series not stacking

Fri Sep 15, 2023 3:06 pm

Hello JamesW!

First, let me provide a simple example of a correct implementation (updating included): https://jsfiddle.net/BlackLabel/dt86c4yn/.

I'm glad you managed it to work for your case, and according to the TS part, the correct typing for the navigator options is NavigatorOptions, so you should use it this way:

Code: Select all

{ navigator: NavigatorOptions }

If the navigator property is the only one you need typing for, the above solution should be working fine, but if you want to type the other chart options, I'd recommend simply referring to the Options. Note that it also includes the navigator property, and depending on your needs, you can use it instead of the above.

Let me know if these types work fine for you, and feel free to share your config if you face any issues related to the series inside the navigator,
Kind Regards!
Kamil Kubik
Highcharts Developer

Return to “Highcharts Stock”