Skip to main content
Solved

Having "View Source" on embedded maps/charts

  • October 8, 2024
  • 3 replies
  • 68 views
  • Translate

Hi All :)

 

Ive seen other portals have the option to view source data at the bottom of a visual, can anyone share with me some example code to get this to work? And does it keep filters etc on from the context?

 

Thanks

 

Ryan

Auto-translation đŸȘ„

Bonjour Ă  tous :) J'ai vu que d'autres portails avaient la possibilitĂ© d'afficher les donnĂ©es sources au bas d'un visuel. Quelqu'un peut-il partager avec moi un exemple de code pour que cela fonctionne ? Et est-ce que cela empĂȘche les filtres, etc., de se connecter au contexte ? Merci Ryan

Best answer by eugenie.clement

Hello Ryan, 
Thanks for the complements, to add the link to the source, you have examples in our code library, for example the observatory template: https://codelibrary.opendatasoft.com/page-templates/observatory/

In order to also have the filter taken into account in your URL, I invite you to use the function {{ ctx.getQueryStringURL() }} which is explained at the beginning of this page https://help.opendatasoft.com/widgets/#/api/ods-widgets.directive:odsDatasetContext

Best regards,

Eugénie

View original

Hi Ryan, can you give me an example to make sure I'm answering your question correctly? Thanks.

Eugénie

Auto-translation đŸȘ„

Bonjour Ryan, peux-tu me donner un exemple pour ĂȘtre sĂ»re que je rĂ©ponds correctement Ă  ta question ? Merci.EugĂ©nie
Translate

  • Beginner
  • October 10, 2024

Hi Eugenie,

 

Ive taken this link from your source of inspirations Portrait des Communes du canton de Fribourg — Portail de donnĂ©es Fribourg

 

As you can see they have a link to review the source data below their visuals, im wondering how to get this on the bottom of our tables, and if possible maps.

 

And secondary if they can be used to keep any filters selected on the page

 

Thanks

 

Ryan

Auto-translation đŸȘ„

Bonjour EugĂ©nie, j'ai pris ce lien de votre source d'inspiration Portrait des Communes du canton de Fribourg — Portail de donnĂ©es Fribourg Comme vous pouvez le voir, ils ont un lien pour consulter les donnĂ©es sources sous leurs visuels, je me demande comment obtenir cela en bas de nos tableaux, et si possible des cartes. Et secondairement s'ils peuvent ĂȘtre utilisĂ©s pour conserver les filtres sĂ©lectionnĂ©s sur la page Merci Ryan
Translate

Hello Ryan, 
Thanks for the complements, to add the link to the source, you have examples in our code library, for example the observatory template: https://codelibrary.opendatasoft.com/page-templates/observatory/

In order to also have the filter taken into account in your URL, I invite you to use the function {{ ctx.getQueryStringURL() }} which is explained at the beginning of this page https://help.opendatasoft.com/widgets/#/api/ods-widgets.directive:odsDatasetContext

Best regards,

Eugénie

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings