Repository navigation
feat(charts): xKey, series labels, valueFormat and locale, stacks and horizontal bars (3.0) - #367
Conversation
… horizontal bars (3.0) Step 1 of the 3.0 chart plan: the props the renderer swap keeps. - xKey names the x column (guessed before); series take label and format. - valueFormat (compact, percent, Intl options or a function) and locale write the value axis and tooltip; without them charts draw as 2.x did. The value axis widens to fit its longest label. - stack (true or "percent") on LineChart and BarChart; BarChart orientation="horizontal", with category labels sized to fit. - C8: date.onChange becomes date.onRangeChange; the codemod renames it in an inline date and reports one built elsewhere. - CurveType and ValueFormat types; curveType stays as a deprecated alias. - Fixes: PieChart gradient ids are scoped to each chart; with no series the x column is no longer drawn as a series; ticks find their row in a map instead of scanning the data. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq
check-props lists inherited ChartProps rows on the mixin's table, so a component page describing xKey, valueFormat or locale is reported. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq
The chart props now use CurveType (curveType stays as a deprecated alias), so the regenerated spec resolves CurveType, not curveType. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq
|
The "Native preview and token export" check failed on This failure isn't caused by this PR:
I'll re-run the failed job once when the workflow run finishes (it is still running). If it fails a second time, I'll treat that as a real failure and look into it. Generated by Claude Code |
…line up with the title A top-left legend was inset a fixed 80px, the old 64px axis plus 16, so a wider value axis (currency) or the category column of horizontal bars put it over the axis labels. Legend takes the axis width. Horizontal bars' category names start 20px in, where the title does, in one column. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq
A DatePicker with no value showed this month, read from the clock while rendering. A page prerendered in one month and opened in the next drew a different month on the server and in the browser, and hydration failed (React #418). The docs check visits pages 25 hours after the build, so every PR's Docs build fails from 30 October 23:00 UTC to the end of the 31st. Without a date, Calendar and the range calendars start on a fixed month, hidden, and move to this month in an effect. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq
|
The Docs build failure (React #418 on Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq # Conflicts: # CHANGELOG.md # packages/core/src/modules/data/interfaces.ts
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtyZsWugGJ282wnC6vq # Conflicts: # CHANGELOG.md # apps/docs/src/content/data/lineChart.mdx # packages/core/src/__tests__/legend.interaction.test.tsx # packages/core/src/modules/data/BarChart.impl.tsx # packages/core/src/modules/data/Legend.tsx # packages/core/src/modules/data/LineBarChart.impl.tsx # packages/core/src/modules/data/LineChart.impl.tsx # packages/core/src/modules/data/PieChart.impl.tsx
Requested by Lorant · project thread
Step 1 of the approved 3.0 chart plan (plan doc). This adds the chart props that stay the same when the renderer moves off recharts in beta.2. It is meant for 3.0.0-beta.1.
What changes
xKeynames the column on the x axis. Before this, the chart guessed it.labelandformat: the legend and tooltip show the label, not the raw key.valueFormat("compact","percent",Intl.NumberFormatOptionsor a function) andlocalecontrol how numbers are written on the value axis and in the tooltip. If neither is set, charts draw exactly as in 2.x. The value axis now widens to fit its longest label (for example2 000 000 Ft).stack(trueor"percent") on LineChart and BarChart, and BarChartorientation="horizontal". In horizontal mode the category labels are sized to fit, and there is room for the legend.date.onChangebecomesdate.onRangeChange. The codemod renames it when thedateobject is written inline, and reports it when the object is built elsewhere. There are no uses in this repo.CurveTypeandValueFormattypes.curveTypeis kept as a deprecated alias.series, the x column is no longer drawn as a series.Docs: the LineChart page has new "Labels and numbers" and "Stacked" sections, BarChart has "Horizontal and stacked", and the setup and props tables are updated. MIGRATING, CHANGELOG and breaks.md (row C8) are updated too.
Checks
pnpm --filter @once-ui-system/core typecheckand the docs typecheck: clean.chart-series-format.test.tsx.pnpm test:codemod: 450 tests pass, including the newcodemod-3.0-charts.test.mjs.modules/data: same error count as the base branch.hu-HU, the percent-stacked area chart, and the horizontal stacked bars.Generated by Claude Code