Skip to content

toolkit: a chart's series can be bound - #453

Merged
tannevaled merged 1 commit into
mainfrom
chart-series
Sep 6, 2026
Merged

toolkit: a chart's series can be bound#453
tannevaled merged 1 commit into
mainfrom
chart-series

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

A host had to assign a field and hope something repainted. That is not a binding, and it is why a queue window watching a live rate had to poke the chart on a timer.

The reason none of them had one is worth writing down: mvvm.Observable is constrained to comparable types, so it can skip a notification when nothing changed — and a slice is not comparable. The vehicle for a series is ObservableList, which also says what changed rather than only that something did.

TimeSeriesChart.Series and LineChart.Values are that list, created on first use and seeded from the existing field. From then on the list is what the chart draws: two sources for one truth is how a chart comes to show last minute data. A chart nobody binds keeps working exactly as it did, which is what the field is still for.

Consumer: godl queue window, whose rate charts follow a live queue.

🤖 Generated with Claude Code

A host had to assign a field and hope something repainted. That is not a
binding, and it is why a queue window watching a live rate had to poke the
chart on a timer.

The reason none of them had one is worth writing down: mvvm.Observable is
constrained to COMPARABLE types, so it can skip a notification when nothing
changed — and a slice is not comparable. The vehicle for a series is
ObservableList, which also says what changed rather than only that something
did.

TimeSeriesChart.Series and LineChart.Values are that list, created on first use
and seeded from the existing field. From then on the LIST is what the chart
draws: two sources for one truth is how a chart comes to show last minute's
data. A chart nobody binds keeps working exactly as it did, which is what the
field is still for.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 47f4a7b into main Sep 6, 2026
2 checks passed
tannevaled added a commit that referenced this pull request Sep 6, 2026
…cal gridlines (#455)

TimeSeriesChart gains Threshold ([]TimePoint, a second reference series
drawn as a dashed line) and OverInk (the color a Points segment switches
to for any stretch ending above the Threshold in effect at that time) —
for a caller charting quota usage against the pace that would exhaust it
exactly at reset, materializing whether it's on track rather than
requiring a visual comparison.

Also adds vertical gridlines at an auto-picked "nice" time interval
(hourly for a short span, daily for a long one, via
verticalGridInterval/verticalGridTicks) alongside the existing three
horizontal value gridlines, so the time axis reads at a glance without
depending only on the two start/end labels.

Rebased onto #453 (bindable Series) and #454 (FollowPeak/NiceCeiling) —
both land in Draw's own body, so this reapplies cleanly against
c.points() rather than the old direct c.Points access.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant