Repository navigation
feat: chart, recharts in WinLab colors - #68
Merged
Merged
Conversation
A chart config takes only primary, muted-foreground or a state color, so charts cannot drift from DESIGN.md's color table. The tooltip is inverted like every WinLab tooltip, the legend follows the config order, axes and grid recede in muted ink. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zyx1121
added a commit
to zyx1121/www.zyx.tw
that referenced
this pull request
Oct 10, 2026
…t legend (#111) Ports three ui.winlab.tw fixes the zyx registry had not picked up: - checkbox keeps its check mounted and fades it with the fill, and a select menu over its trigger now fades both ways; DESIGN.md says every animation runs the same way in and out (NYCU-WinLab/ui#30) - a combobox menu is at least as wide as its trigger and keeps the popover's width, so a short trigger no longer truncates the options (NYCU-WinLab/ui#67) - chart gains ChartLegend and ChartLegendContent in the config's order, and DESIGN.md adds the drawing rules: 4px bar ends, 2px lines, horizontal grid, a legend for two series (NYCU-WinLab/ui#68) Also fixes the button comment that still said WinLab apps. Claude-Session: https://claude.ai/code/session_01DNMgVpzJEQhK39qSpfRJvU Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
chart(modelled on shadcn's chart, rewritten for this design system), needed by the portal's reimburse stats page.ChartConfigmaps each series to a label and one ofprimary,muted-foreground,success,destructive,warning; the container writes them as--color-<key>.ChartTooltipContentis inverted (foreground on background) liketooltip, text-body only;formatLabelandformatValuefor units.ChartLegendContentlists series in config order with an SVG swatch.chart./chartwith a monthly income/expense bar demo.Verified on the sandbox: typecheck, lint, tokens:check, theme:check, format and build pass;
public/r/chart.jsonis generated; the demo renders 10 bars, the legend reads 收入 then 支出, and hovering 7 月 shows 收入 NT$ 15,000 / 支出 NT$ 11,800.🤖 Generated with Claude Code