Kyreus
Posts: 3
Joined: Thu Jun 23, 2022 7:37 am

Always show breadcrumbs

Hey guys,

Is it possible to always show the breadcrumbs? Even on the top level chart? With older versions I've forcefully enabled the drillup button with showDrillupButton - is there any similar method available?

Kind regards
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: Always show breadcrumbs

Hello Kyreus!
Welcome to our forum and thanks for contacting us with your question!

Sadly, there is no option in API, which will show you breadcrumbs from the load of the chart. But you can use a Highcharts SVG Renderer to create a dummy breadcrumb based on shown series. Please, take a look at the demo below.

Demo: https://jsfiddle.net/BlackLabel/21uras8o/
API Reference: https://api.highcharts.com/class-refere ... derer#text

Let me know if that fits your requirement.
Kind regards!
Hubert Kozik
Highcharts Developer
Kyreus
Posts: 3
Joined: Thu Jun 23, 2022 7:37 am

Re: Always show breadcrumbs

Hey again,

thank you for your answer this would be exactly what I'm looking for.
When I try to implement your render function, I don't have a member called "breadcrumbs" inside the chart class. We are using TypeScript and the highcharts npm package with the verison number 10.1.0. Even if I ignore the liniting error "chart.breadcrumb" is always undefined. If I print the chart instance to the console I can't see a "breadcrumb" member either.

Kind regards
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: Always show breadcrumbs

Kyreus,
breadcrumbs object is added to the chart after clicking on some series name to do drill-down. Also, there is a possibility, that breadcrumbs are not added to the chart interface in Highcharts core. I think the simplest solution would be to cast it as any or extend the chart interface to add new properties. I have prepared the demo in Angular + TS and everything is working correctly.

Demo: https://stackblitz.com/edit/highcharts- ... ine-3unvqk

Kind regards!
Hubert Kozik
Highcharts Developer
Kyreus
Posts: 3
Joined: Thu Jun 23, 2022 7:37 am

Re: Always show breadcrumbs

Thank you very much for your help. I got it working right now :)
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: Always show breadcrumbs

You're welcome! In case of any further questions, feel free to contact us again.
Hubert Kozik
Highcharts Developer

Return to “Highcharts Usage”