legendConfig

Examples

# Categorical legend
kind: Legend
type: Categorical # OPTIONAL    
labels: [Type A, Type B, Type C] # OPTIONAL
colours: [[255,0,0], [0,255,0], [0,0,255]] # OPTIONAL
# Staggered legend
kind: Legend
type: Staggered # OPTIONAL    
labels: [0%, 25%, 50%, 75%, 100%] # OPTIONAL
colours: [[255,0,50], [255,0,100], [255,0,150], [255,0,200]] # OPTIONAL
# Categorical legend with labels and colours from a Grasshopper model
kind: Legend
type: Categorical # OPTIONAL
subscribe:
  kind: Model
  frame: my-home-frame
  source: my-model
  legend: my-gh-legend-out
# Staggered legend with labels and colours from a Grasshopper model
kind: Legend
type: Staggered # OPTIONAL
subscribe:
  kind: Model
  frame: my-home-frame
  source: my-model
  legend: my-gh-legend-out

Object properties

Name Type Required
kind Constant: Legend yes
labels Array no
colours Array no
type One of no
subscribe Array no

Object information

  • Object with the following properties:
    • kind (required): Constant Legend
      • Legend
    • labels (optional): Array of:
      • string
    • colours (optional): Array of:
      • Array of:
        • minItems: 3
        • maxItems: 3
        • number
    • type (optional): One of the following types:
      • Constant Categorical
      • Constant Staggered
    • subscribe (optional):