Question

HTML rendering in new dashboards

  • 19 November 2021
  • 3 replies
  • 30 views

Has anyone else had issues with HTML rendering differently in the new dashboard experience? The spacing looks totally different from how it appears in our legacy dashboards. The example below shows the exact same tile in legacy vs new for version 21.6.39. The divs and line breaks get so much additional spacing that the tabs are no longer visible. Curious if anyone has a fix for this before I start redoing all of our HTML parameters. 

 

Legacy Dashboard:

New Dashboard:

 


3 replies

Which viz type is this? Is it a single value viz? I’ve used this logic before for a single value viz: 

html: <div class="vis">
<div class="vis-single-value" style="line-height: 1;font-size: 17px; text-align:center;color:black;" >
</div>
</div>;;

 

Userlevel 1

@haleyb , I have had similar spacing issues and done some work to change the style parameter for each HTML element, specifically changing padding and margin to 0px.

 

@n_davis , I have played around with the HTML parameter in dimensions and measures within Looker, can you explain any benefit from using the class parameter?

Normal HTML, I use them all of the time especially with sharing style options, but in Looker, I have to rewrite the style property for every element and would love to not have to do that.

@minerkt I found that with the new dashboards I had to add this logic for more than 2 rows in a single value viz to format right. I didn’t have this problem with legacy dashboards. Without this logic, the visual would space everything out (and sometimes outside of the view) which I didn’t want. You have to define the class that it is a vis and that the vis is a single value vis if you want the formatting to turn out right for a multi-line html logic. It is possible that there are other workarounds, this is just what I found to work.

Reply