Skip to content

toolkit: add LineChart polyline plot#9

Merged
tannevaled merged 1 commit into
mainfrom
toolkit-linechart
Jul 10, 2026
Merged

toolkit: add LineChart polyline plot#9
tannevaled merged 1 commit into
mainfrom
toolkit-linechart

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

The full-size sibling of the inline Sparkline: plots one []float64 series as a polyline over a left+bottom axis frame. Values spread evenly across the plot width and scale vertically between Min and Max (auto-derived from the data when equal). A lone point renders as a dot; an empty series draws just the axes. Display-only.

Adds a shared Bresenham drawLine raster helper (over putPixel — the primitive both back-ends share for arbitrary slopes; on a CellPainter each pixel promotes to a filled cell), so the same chart renders as anti-aliased pixels (WUI/GUI) or promoted cells (TUI).

Renders through painter.Painter. 100% coverage; go vet clean; builds on all 6 arches + js/wasm.

🤖 Generated with Claude Code

The full-size sibling of the inline Sparkline: plots one series as a
polyline over a left+bottom axis frame, values spread evenly across the
width and scaled between Min/Max (auto-derived when equal). A lone point
renders as a dot; an empty series draws just the axes. Adds a shared
Bresenham drawLine helper (over putPixel — the primitive both back-ends
share for arbitrary slopes). 100% coverage.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit b7ee2d8 into main Jul 10, 2026
1 check passed
@tannevaled
tannevaled deleted the toolkit-linechart branch July 10, 2026 12:19
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