get_property_colors

The legend of the current colouring as { property, mode, colors: { value, color }[] }; property and mode are null when nothing is coloured.

Query

Usage

TypeScript
surface.query('get_property_colors')

Returns

object with property, mode, colors, in the ok: true envelope.

JSON
{
  "type": "object",
  "properties": {
    "property": {
      "type": [
        "string",
        "null"
      ]
    },
    "mode": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "categorical",
        "range",
        null
      ]
    },
    "colors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "value": {
            "description": "any JSON value"
          },
          "color": {
            "type": "array",
            "minItems": 3,
            "maxItems": 3,
            "items": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            }
          }
        },
        "required": [
          "value",
          "color"
        ]
      }
    }
  },
  "required": [
    "property",
    "mode",
    "colors"
  ]
}

See also