Question

Button to toggle between two Looks

  • 14 January 2021
  • 3 replies
  • 67 views

Hi Experts,

 

I have two different Looks (visualizations) which show two different KPIs. I want to create a button (with Text and Color) to toggle between the two Looks. 

Can someone please help on that how to pass the two URLs in a HTML?

I guess Button can either be through or Text or Dimension.

 

Regards!

 


3 replies

Userlevel 3
Badge

Hi @DickyMohanty 

Would you want to do this in an embed application or within Looker? For the latter, you could create two single tile dashboards and the only query tile on each one would be the Look. You could create a text tile similar to the one listed here and the user could click the link in the text tile to be redirected from the first dashboard to the second dashboard and vice versa. 

krishpotluri outlines a great HTML pattern here. You would just need to create the identical text tiles on both dashboards, and have the link direct the user to the other dashboard.

Please let me know if you have any questions.

 

Thanks,

Eric

@Eric_Lyons ,

 

Appreciate the response. I would certainly go through the links mentioned by you and will revert with updates. 

Also, as of now, I am trying to build in Looker itself. But later I have plans to embed the visualizations on a different platform. Wondering, if we can embed those buttons as well. 

Regards!

@Eric_Lyons  , @krishpotluri  , 

Thank you. I tried as suggested. 

However clicking on the Link, is opening the complete Look separately, shifting away from the Dashboard view.

 

If my two Looks are saved on a Dashboard, can I have this Button Link to toggle the Looks on the same Dashboard, without shifting from the dashboard? 

How can I have the same button to show two different Texts (Non-Active one to be visible, clicking on which it will open up the Hidden Look)
And, while the toggle, always the Active Look should be visible (1 Look at a time).  

Any thoughts? 

 

Below is the Code: 

 

<p align="center">

<a href="https://ldec5009arplk01:9999/looks/27" >   /*Look URL*/

<img border="0" alt="altText" src=" data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAkFBMVEX///8SEBEAAADj4+MKCAkjIiINCwwjICEnJibLysp6eXkLCQqRkJCamZkSERH4+Pjx8fHS0tLu7u6ysrLLy8v19fXBwcHh4eFWVlZPTk66urozMzPX1tZfXl4vLS2goKCKiopAPz9sbGx/f3+0tLQbGht0c3OoqalCQUFJSEhlZGQYFhaMios4ODgIAAcZGBWhhhSgAAAI0UlEQVR4nO2da3uiPBCGdcBoR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qDfUyqKUyJfIUIs6ruU51iBDrq5ar5xbkRN0pthHmM7iRKw3kuL19b4fYh5jEsWJEdeqPe5soNRZ5CF5WfqVJputXBbckZ/Ps0wnCidOIjTqNYj87Frx2w1erhR26434cWav+rvxAelyLDNPPdvRdt3VM42uOOTClfUcK8SPeBAS/R7K5Cd4e0NBAOwxRkmJ4aBuvNftLLq/hSOOnHyNNS2jf3cK97fsm5fodV741sbeZu8fdPQ8onhlLG2GeEP9tX+DM7hqHfLuNhYNROWuSEcVtyqg7xXb0zkFBbMBHbuSphbXLv3ozySfZsTUpvMX28JL+UQgFVifzHE6sUSJtIP0A+Wl6JQEFGk2rLue8qFGWHoopT0hVpDo3mQzOwFOcymdRYDnQWKPSzXW5dJRZn9I5Yn77TqVmi+FoLR69Vog4DwQJbraDOsQgd0m3vDSb1ZVQ4ylEroyU1VeaBL02RhbmsoRsBVpJU5WVYYdVFpAzWopNonukAcJ8aweqDnXRmUnvbqagfhwzijZRW0sn2WIVGAyCR84GzVms0Sx79AFkqDzaWRBnmiul+3vupyOwLbf5mL7Fd/Z3pZH+qsCyn8vT9OX/lSFF7z8eeOevs03GYI1Gmn76tB0c/CiR65wtDEK2SF7/78er/lbKPv2cd/yXsDxzppgYcI81ynWiwTULv6lh/HobbVbR/di1NkmL7BxjZY6tTvHua2vaoWUF5n6a9WF6exr1YXpo/0Ie/X6GK0sbzBxSqKG08f0ChitLG8wcUqihtPH9AoYrSxqMdC9+jJP3INgXjyMwj9YtICoVCoVAoFAqFQqFQKBQKheIb/gf6mJW0L982lwAAAABJRU5ErkJggg=="

height="55" width="60">

</a>

</p>

<p align="center"> <i>

<font size = "2">

Dollars View  /*Text*/

</f>

</i></p>

Reply