Creating headers/header tiles in dashboards

  • 7 January 2015
  • 12 replies
  • 1999 views

Userlevel 1


Note this is no longer needed as of Looker 3.46. See docs.





I have done this before but have seen better versions than I have managed. Would someone please comment with a good example and include the LookML and a screenshot?


12 replies

Userlevel 3

You can ‘hack’ dashboard headers creating a measure with the html: parameter including the text you’d like to see rendered wrapped in the <p> tag.


  - measure: dashboard
type: count
html: |
<p> Current Trial Breakdown </p>

Then I choose this measure as a single value visualization element type and it displays like so:


Userlevel 5
Badge

Another slick trick is to take something like @Joshua_Moskovitz’s dashboard measure/element and add a dashboard note to the element. This way you can add extra information about your current trials, or even create a read me for the entire dashboard.


  - measure: dashboard
type: count
html: |
<p> READ ME </p>
Userlevel 2

I was going to file a feature request, but figured I’d just chime in here: please make it so we can add headers without this hack 🙂

Userlevel 3

You can also do this with a slightly nicer hack by generating the header in a calculated column instead of creating a measure.


That way it only makes the dashboard.lookml messy, but doesn’t require you to add any fake measures to view.lookml files.

Userlevel 5
Badge

I agree with @brayden that using a table calc is the best course of action here. For example, you can create a table calc like this:


"Header Title"


Just add another measure to the Look and hide it from the visualization. You’ll end up with a single value visualization like this:


Userlevel 1

It would also be useful if you could have visualizations without a title bar. One of my dashboards has the current figure for 4 KPI’s on the top row, then the second row has a small chart showing the historical trend for the KPI above it - it doesn’t need a title and just wastes space.

+1 for having headers, and text content elements (markdown?) without the hack.


The way it is now it looks odd to have both the header’s own title bar above it, and the “last refreshed” time below it

Userlevel 3

This is no longer needed as of Looker 3.46! Checkout the docs about a new, built-in feature.


Userlevel 3

Do these work on LookML dashboards?

Userlevel 3
Badge

Hey Brayden!


We’ve introduced this feature for lookML dashboards too, as of version 3.46!


Here’s the lookML:


elements:

- name: element_name
type: text
title_text: "title text"
subtitle_text: "subtitle text"
body_text: "body text"

And the result:



Enjoy!

Is there a way to get these title blocks to display in email using in-line visualization?

Userlevel 3

This is great! But when running the lookml validator on this, I get:

Reply