Series chart

Series chart

SeriesChart displays one persisted numeric series as bars (the default) or a line using TanStack Charts and Pipeline tokens. It accepts a title, a value label, an optional chartType (bar or line), an optional caption and structured evidence context, and points with label, value, and optional partial fields. Category labels appear in the supplied order. The chart includes keyboard inspection and a collapsible table of exact values.

The agent-facing render_chart contract limits a snapshot to 1 to 31 unique categories and finite, nonnegative values, or null for unavailable observations. Gather complete evidence before calculating counts. Agents use count_events_by_day for raw timestamps and preserve its returned points and total; this avoids manual date conversion and arithmetic. Include confirmed zero days, preserve unavailable periods as null, and mark an incomplete day with partial: true.

New render calls require context.source; time-based charts also supply context.period with an inclusive start, exclusive cutoff, and timezone. The daily-count tool returns this context alongside its counts. The chart shows a compact period and a local cutoff for incomplete days; Values and source contains exact boundaries and source details. Caption-only saved charts remain readable. Use a caption only for an additional qualification, and keep repeated counts or metadata out of adjacent prose. A report can set presentation.summary: null when its headline and chart suffice.

Use lines only for ordered, equally spaced periods. Lines use straight segments and visible points; incomplete connections are dashed and incomplete points hollow. Null observations retain their category position and break the line. The report saves these values instead of fetching a changing series when reopened.

For a local check-in preview, open /proto/waitlist-chart in apps/operate. It uses the production render-tool binder, rich-block registry, and report card. The default example is synthetic; Test another snapshot accepts a validated render_chart JSON payload or an agent trial’s complete report with its successful render calls and duration. It preserves the agent’s original wording and chart data without writing to a workstream or sending a message.

For server image exports, import renderSeriesChartPng from @o/pipeline/experimental/blocks/chart/render. Pass the same snapshot plus { fontFile } pointing to the bundled Muoto TTF (@o/pipeline/fonts/muoto.ttf). The renderer shares the browser’s marks and scales, uses a light background for Slack, and disables system-font fallback. Keep this native renderer out of browser entry points.