The number and date formatting in visualization labels, bubbles, and legends can be customized by adding the appropriate characters into the format text.

Number Formatting

For example, a {measure} label can be formatted as,

{measure:[$]#,##0.00}

For each measure occurrence, this format will add a dollar sign, comma separators and round to two decimals (i.e. $256,145.15). Full list of formatting options:

  • [Anything] : ‘Anything’ in brackets will be put the location they’re found. this will mostly be used for currency signs. Above example says that there should be dollar sign at the beginning of the number.
  • #,## : Adds comma separator for thousands. This keyword doesn’t work alone; you also need to add “0” or “0.x” to the end (i.e. #,##0.00).
  • 0 : The number will be rounded to the nearest whole number.
  • 0.0 : The number will be rounded to one decimal place. More zeroes added to the right means more decimal places allowed. (i.e. 0.000 means 3 numbers after the decimal)
  • s : Adds SI-prefix to numbers. (i.e. a format like #,##0.00s will be displayed as 45M with a value of 45150000. Adding one more zero before the ‘s’ will give 45.1M.)
  • % : Converts the number into a percentage. Works like the “s” keyword. The values will be multiplied by 100.

Another example,

${y:#,##0.0}

will format your Y axis as a currency and round it to one decimal point.

Date Formatting

For example, a {date} label can be formatted as,

{date:d-mmm-yyyy}

This will show date in Day-Month Abbr.-Year format (i.e. 2-Dec-2016). Full list of formatting options:

  • AM/PM : Represents AM or PM for time. (i.e. For the date and time 12-2-2016 05:12:22, and format mmm, yy h:mm:ss, AM/PM will display ‘Dec, 2016 5:12.22 AM’.)
  • yyyy : Displays the full year.
  • yy : Displays the last two numbers of a year. (i.e. 16 for 2016)
  • mmmm : Full name of the month.
  • mmm : Abbreviated name of the month.
  • dddd : Full name of the day.
  • ddd : Abbreviated name of the day.
  • d : Numerical representation of the date.
  • h : Display hours.
  • mm : Display minutes.
  • ss : Display seconds.