Skip to main content
Open

On a Studio page, apply filters on multiple visualisations from different datasets

Related product area:Asset views
  • April 11, 2024
  • 7 replies
  • 200 views

On a Studio page, when creating a filter, I want it to be applied to multiple visualisations based on different datasets with a common key. 

For example, I have several datasets with a colum “city” (population, schools, bicycle lanes, ..) and I want to propose a page where the user can choose his/her city and explore the visualisations linked to it (e.g. number of inhabitants, a map of the schools, a top 10 of the most popular bicycle lanes, etc..).

7 replies

Amélie HERVE
Forum|alt.badge.img

Indispensable 😀


  • May 21, 2024

We know this feature is a must have. We initially tried to include it with the first version of studio filters, but it is quite a challenge.

We’re actively considering to develop it in the coming months. I leave the idea open for the time being, until it moves forward into the roadmap, should we find a suitable way to do it.

Auto-translation 🪄

Nous savons que cette fonctionnalité est indispensable. Nous avons d’abord essayé de l’inclure dans la première version des filtres de studio, mais c’est tout un défi. Nous envisageons activement de le développer dans les mois à venir. Je laisse l'idée ouverte pour le moment, jusqu'à ce qu'elle avance dans la feuille de route, si nous trouvons un moyen approprié de le faire.

  • Seeker
  • November 18, 2025

Is there an update on this now?


  • Observer
  • November 27, 2025

Pardon my french page, we do that on our portal in this page : https://equipements.sports.gouv.fr/pages/portrait-territoire/

 

The first thing to do is to declare a default value using ng-init. Then you can update it with ng-click, at the same time, when you change it, you can pass the city as a filter to different datasets. On our page, we can filter on different columns (region, city ...), so it’s even trickier, but still doable.

 

ng-init="search = {'query': '', selection: 'France', 'querry2' : '', 'selection2' : 'France'}"

 

Then :

 

<a href="#" ng-click="search['query'] = undefined;
                                                          searchcommune.parameters['q'] = undefined;
                                                          search.selection = item.fields.nom_commune;
                                                          dataes1.parameters = {'q': ''};
                                                          dataes1.parameters['refine.new_code'] = item.fields.codeinsee;
                                                          dataes1.parameters['refine.epci_code'] = undefined;

...

Feel free to ask other questions for precision ;)


Amélie HERVE
Forum|alt.badge.img

Pardon my french page, we do that on our portal in this page : https://equipements.sports.gouv.fr/pages/portrait-territoire/

 

The first thing to do is to declare a default value using ng-init. Then you can update it with ng-click, at the same time, when you change it, you can pass the city as a filter to different datasets. On our page, we can filter on different columns (region, city ...), so it’s even trickier, but still doable.

 

ng-init="search = {'query': '', selection: 'France', 'querry2' : '', 'selection2' : 'France'}"

 

Then :

 

<a href="#" ng-click="search['query'] = undefined;
                                                          searchcommune.parameters['q'] = undefined;
                                                          search.selection = item.fields.nom_commune;
                                                          dataes1.parameters = {'q': ''};
                                                          dataes1.parameters['refine.new_code'] = item.fields.codeinsee;
                                                          dataes1.parameters['refine.epci_code'] = undefined;

...

Feel free to ask other questions for precision ;)

 

 

Question par rapport à ce post : 

la page que vous citez est faite avec le studio ou en mode Editor ?

parce qu’effectivement, en mode éditeur de page, pas de souci, ici, nous utilisons déjà toutes ces fonctionnalités également (cf https://data.lamayenne.fr/pages/apps/). Ce post avait vocation à permettre cette même fonctionnalité de filtre, dans le studio.


  • Observer
  • November 27, 2025

Oups my bad, read this to fast. Sorry !


josephinerohner
Community Manager
Forum|alt.badge.img+2

Currently, filters created in Studio do apply to all visualizations on the page, but they are limited to a single source dataset. For a scenario like yours—involving a common "city" key across multiple distinct datasets—the current solution involves using the Code Editor and ODS widgets (specifically `ods-dataset-context`). This requires some HTML, but our code library includes examples for this type of use case. We’ve noted your idea, and it remains open for voting!