Question

Alignment options in Looker

  • 7 March 2017
  • 1 reply
  • 1464 views

Userlevel 2

Hi,


Looker by default align dimensions to left and measure values to right in Look (Table). Is it possible to customize that to left, center or right align?


1 reply

Userlevel 3

@kshah7 there is an easy way to change the alignment of field values using the html parameter.


For example, to make values align to the right we could do:



New LookML
```
dimension: field_name {
sql: ${TABLE}.field_name ;;
html:

{{ value }}

;;
}
```


Old LookML
```
- dimension: field_name
sql: ${TABLE}.field_name
html: |

{{ value }}


```

You can read more about the html parameter and its uses in our docs here.

Reply