How to implement drill-down mechanism on geographical data in Deneb for PowerBI using Vega-lite

25 views Asked by At

I'm trying to create a map in Deneb using vega-lite which replicates the drill-down mechanism, meaning that starting from the overview of the Lombardy region in Italy (picture below) divided by its provinces, I can click on one of the province and drill-down to the cities level, as shown below.

I managed to do so by using multiple layers, as shown in the images below: when the user click on one of the Province, the map focus on that province and shows the cities level.

Province level of the Lombardy region (Italy)

Cities level of one of the province when selected

However, there is a problem I cannot solve: when the user is at the cities level, he can further select one city to filter the other visuals in the PowerBI report with that city. The problem is: when the user selects one of the city, the map will further zoom on that city, as shown below, and this is not the behavior I want. I would prefer that when a city is selected, the other cities greys out and only the selected territory remains colored.

the problem of the "zoom" on the city when it is selected

Expected behavior: when the user selects one city inside the territory of the selected Province, the other cities grey out

Here is my code: text

Thank you in advance for the help

0

There are 0 answers