Multiple category levels in charts


I’m using Highcharts integration at the moment. However, I guess this applies to Googlecharts as well. If I have multiple row fields – e.g. country and category in your example data, the data passed to the chart only has the highest level category, e.g. country, even when this is expanded in the pivot grid to show categories for a country. It would be nice for the chart to reflect the state of the expanded/collapsed grid, which is what the documentation seems to imply. Is this possible, or am I missing something?

3 answers

WebDataRocks Team WebDataRocks March 13, 2019

Hi, Bernie!

Thank you for posting your question.

You can implement the described scenario by using the drill-down feature of Highcharts. We’ve prepared a demo to show how to create a chart based on the data from the current report and add the drill-down functionality to it.
Unfortunately, Google Charts does not provide with such a built-in feature. But you can use prepareDataFunction to pre-process the data the way you like. Please refer to the article about googlecharts.getData() to learn more about it.

Hope this demo will help you find out how to prepare the data to show the deepest drill-down levels on Google Charts.

Best regards,

WebDataRocks Team

Bernie 4 days ago

Hi Team,
Many thanks for the response. Looks good.
However, a little oddity in the Google example:
If I expand “Speciality bike shop” (SBS), I see the chart change to the sub-values for SBS. If I then expand “Value added reseller (VAR), the chart is still for SBS. But if I collapse all and expand first VAR then SBS, I first see the chart for VAR, then for SBS. It seems as though if more than one category is expanded, then only a change in state to the first category initiates a change to the chart (I think?).

WebDataRocks Team WebDataRocks 4 days ago

Hi, Bernie!
Thank you for the answer.
Yes, you are right about the example.
But it was created just to illustrate the approach, so it’s not fully functional.
You can adjust the prepareDataFunction‘s code to work properly with your specific data.
Hope it helps.
WebDataRocks Team

Please login or Register to Submit Answer