Canvas

When the built-in components aren't enough, draw your own: gauges, games, clocks, maps or visualizers. Coordinates are points from the canvas's top-left corner. Give the canvas an id and each click sends {"x", "y"}.

Shapes

ShapeFields
rectx y w h radius fill stroke width
circlex y r fill stroke width
linepoints: [[x,y], …] color width closed
polygonpoints fill (convex)
arcx y r start end color width. Degrees, clockwise from 12 o'clock.
textx y text size color anchor bold. anchor is start, center or end.
iconx y icon size color fill

A gauge

json
{ "type": "canvas", "width": 104, "height": 104, "id": "gauge", "shapes": [
  { "type": "arc", "x": 52, "y": 56, "r": 40, "start": -120, "end": 120, "color": "faint", "width": 6 },
  { "type": "arc", "x": 52, "y": 56, "r": 40, "start": -120, "end": 30,  "color": "accent", "width": 6 },
  { "type": "text", "x": 52, "y": 56, "text": "62", "size": 24, "anchor": "center", "bold": true } ] }

Animation

To animate, send a new tree each frame from a live plugin. About 30 updates a second works well for a tile.

When nothing is moving, send nothing. Nook uses no CPU while idle, and your plugin shouldn't either. The analog clock example redraws once a second, on the second.