How can I add currency?

This can be achieved by using “meta.pretext” and “meta.posttext” in the data model.

This works because we use it in our format function like this: vanilla-components/src/components/util/format.ts at main · embeddable-hq/vanilla-components · GitHub

e.g.:

- name: price
        type: sum
        title: Total USD
        sql: price_usd
        meta:
          pretext: '$'
          posttext: ''