0

I’m trying to add a button in Looker inside a measure. I’m doing it by editing the HTML part. I’m trying to move the button to be below the "single_value_title" as it defined in the .dashboard file.

I tried to change it by using the style “position” without any success too. I also tried to use the button type and it looks like another identity (we want the new button to be inside the box as part of it, and with the icon) Does someone have an idea how to move it?

This is the code I added:

html:{{rendered_value}} 
    <p style="height: 50px"><a style="font-size:10px; padding: 3px 4px 3px 2px; letter-spacing: 0px; border: 1px solid #0042e4;text-align:center;color: #0042e4; background-color: white; " href="https://google.com" target="_blank" rel="noopener noreferrer">
    <img src="...favicon.svg" height=10 width=14> button </a></p>
    ;;

This is how it looks like now

enter image description here

shr7
  • 163
  • 1
  • 2
  • 6

1 Answers1

0

I don't think you can do this, since the html key really just replaces the value element of a visualization, not the things around it.

But there's no reason you couldn't fake it. You could copy the html of the title div from the Look you have now, and then disable the title in the UI and include the title HTML in your block:

html:{{rendered_value}}
    <div ...> single_value_title ... </div>
    <p style="height: 50px"><a style="font-size:10px; padding: 3px 4px 3px 2px; letter-spacing: 0px; border: 1px solid #0042e4;text-align:center;color: #0042e4; background-color: white; " href="https://google.com" target="_blank" rel="noopener noreferrer"><img src="...favicon.svg" height=10 width=14> button </a></p>
    ;;
tconbeer
  • 4,570
  • 1
  • 9
  • 21