anuwa85
Posts: 39
Joined: Sun Oct 20, 2019 1:13 pm

Highcharts Drilldown

I have a anguler project and i want to use drilldown in my project. I'm using rest API to load data.

here what i notice is all the data is loaded when chart get load.

is there a way to load the data which is relevant when drilling down.

say we have 3 countries and cities. first we show countries. so we need to load country data.
when user click on one country say USA we need to fetch the data for usa cities, not all the cities .

Currently when the charts is loading it loads all the countries and cities
rafalS
Posts: 2665
Joined: Thu Jun 14, 2018 11:40 am

Re: Highcharts Drilldown

Hi,

Welcome to our forum and thanks for contacting us with your question.

You can define your drilldown in many ways. The way I would do this is to define click event on point that will tell you which point exactly was clicked, then fetch the new data from your API, and then, after getting proper data, fire a drilldown using chart.addSingleSeriesAsDrilldown() method.

Here you have some API Reference: https://api.highcharts.com/highcharts/p ... ents.click
https://api.highcharts.com/class-refere ... sDrilldown
Note that addSingleSeriesAsDrilldown() method is not documented and I gave you link to addSeriesAsDrilldown() method.

You can find many examples of the usage of addSingleSeriesAsDrilldown() method on this forum or StackOverflow.

Let me know if you have any further, more specific questions.

Best regards!
Rafal Sebestjanski,
Highcharts Team Lead
magistr4815
Posts: 10
Joined: Mon Dec 16, 2019 1:52 pm
Contact: Website Skype YouTube

Re: Highcharts Drilldown

rafalS wrote: Mon Oct 21, 2019 10:09 am Note that addSingleSeriesAsDrilldown() method is not documented and I gave you link to addSeriesAsDrilldown() method.
Why isn't the method (addSingleSeriesAsDrilldown) in the documentation?
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: Highcharts Drilldown

Hi magistr4815,
Good questions, I don't know exactly why.

You can submit this as a future request on our GitHub to update the documentation.
https://github.com/highcharts/highchart ... new/choose

Best regards.
Sebastian Hajdus
Highcharts Developer

Return to “Highcharts Usage”