Syntax for applying multiple format functions to a field?


#1

Specifically, I am trying to use roundToPrecision and then coloringValue. I understand them individually, but I can’t find the format function that chains together two others.


#2

The formatter function you’re looking for is called multiCall. Here’s an example of a multiCall formatter that joins an array of strings and truncates the result after 80 characters:

{
  "format": {
    "funk": "multiCall",
    "args": [
      {
        "funk": "join",
        "args": [
          ", "
        ],
        "then": {
          "funk": "truncate",
          "args": [
            80,
            "..."
          ]
        }
      }
    ]
  }
}