Pretty Charts: operators
What a supplier needs to serve pretty-charts.
- Service ID
pretty-charts- Required version
pretty-charts >= 1.0- Image
ghcr.io/thefeloniousmonk/pretty-charts:1.0.1- Minimum RAM
- 1 GB
- Minimum disk
- 1 GB
- RPC types
- REST (expected)
Backend
The pretty-charts container (Node 22, Vega 6, Vega-Lite 6; built from github.com/TheFeloniousMonk/portal-services, pretty-charts/backend) behind the HA RelayMiner with the rest backend pointed at it. No auth toward the backend; callers cannot send headers. CPU-bound; about 150 MB RAM per render worker (PC_WORKERS, default 2). Caps are PC_* environment variables.
REST
Backend: pretty-charts container on :8080; mount at /
POST /v1/chart, GET /v1/version, GET /healthz, GET /v1/capabilities, and GET /v1/openapi.json are expected. Every response is a JSON object; the SVG or HTML rides in the 'html' string field, always last.
Notes
Every request is a POST JSON body to /v1/chart; typical renders finish in well under a second. No rate limits to disable. SAGE operators: type generic (its name for passthrough), rpc_types ["rest"], relay_timeout at least 15s; see sage-service.yaml in the service repository.
Health checks
| Type | Request | Expect | Why |
|---|---|---|---|
| REST | GET /v1/version | $.service matches ^pretty-charts$ | Identity probe: pins the backend to this service so a wrong backend cannot be staked under this id. |
| REST | GET /healthz | $.status matches ^ok$ | Readiness probe: 200 only once a render worker is up. |
| REST | POST /v1/chart{"data":{"values":[{"a":"A","b":1}]},"chart":{"type":"bar","x":"a","y":"b","tooltip":false}} | $.marks matches ^1$ | Functional probe: renders one bar and reports one data mark. Cheap and deterministic. |
Running it
Build the backend from backend/, or pull the published image:
docker pull ghcr.io/thefeloniousmonk/pretty-charts:1.0.1Images are tagged with the version the backend reports at GET /v1/version. Keep up with the required version above; an older backend can reject requests that newer callers send.
The service's deploy/ folder has:
- add-to-relayer.sh
- answers.json
- deploy.sh
- docker-compose.yaml
- relay-test.sh
- relayer-service.yaml
- rendered
- stake-test-app.sh
- supplier_stake_config.yaml
The service's docs cover its settings and anything a supplier must provide.