suite-charts
Use when adding a chart, graph, sparkline or stat tile to a Suite app. Provides accessible React SVG charts and framework-free scale and statistics helpers.
- License 许可
- MIT
- 所属仓库
- jeswr/solid-sdk
- 最近更新
- 2026-11-15
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- suite-charts
- description
- Use when adding a chart, graph, sparkline or stat tile to a Suite app. Provides accessible React SVG charts and framework-free scale and statistics helpers.
02 资源文件 24
- 许可证LICENSE1.0 KB
- 参考文档package.json1.2 KB
- 参考文档README.md11.5 KB
- 脚本scripts/copy-css.mjs190 B
- 其他src/bar-chart.tsx4.4 KB
- 脚本src/index.ts556 B
- 其他src/line-chart.tsx10.0 KB
- 脚本src/scale.ts4.7 KB
- 其他src/scatter-chart.tsx3.8 KB
- 其他src/shared.tsx10.4 KB
- 其他src/sparkline.tsx1.6 KB
- 其他src/stat-tile.tsx1.5 KB
- 其他src/styles.css4.9 KB
- 其他src/timeline-chart.tsx6.9 KB
- 脚本src/types.ts1.8 KB
- 其他test/components.test.tsx30.4 KB
- 脚本test/scale.test.ts6.0 KB
- 脚本test/setup.ts193 B
- 其他test/shared.test.tsx1.7 KB
- 脚本test/ssr.test.ts2.0 KB
- 脚本test/styles.test.ts1.6 KB
- 参考文档tsconfig.build.json410 B
- 参考文档tsconfig.json657 B
- 脚本vitest.config.ts248 B
03 SKILL.md 正文
<!-- AUTHORED-BY Codex GPT-6.1-Sol -->
Use @jeswr/suite-charts instead of writing app-local SVG charts. Read the
package API and examples for prop types and behaviour.
Import components from the package root, helpers from @jeswr/suite-charts/scale,
and @jeswr/suite-charts/styles.css after suite-ui token and theme styles. Add a
workspace:* dependency in workspace consumers. The scale entry has no React
imports and is suitable for server/data code.
Choose LineChart for numeric/time series, BarChart for categories, ScatterChart for paired observations and TimelineChart for lanes of intervals or events. Sparkline and StatTile provide compact summaries. Supply a useful title, units, stable IDs and a description explaining the observations. Aggregate and interpret data in the app; chart components perform no storage or network work.
Keep these invariants when integrating or extending the package:
- One y axis and one unit per line chart. Numeric x values cannot mix with Date/ISO x values. Dates and default time labels use UTC; wrap numeric timestamps in Date when a line chart should use time mode.
- Series array position owns its palette slot. Fold more than five series into “Other” before rendering. Preserve dash patterns, neutral text, the legend, keyboard tooltips, large point hit targets and the table alternative.
- Active timeline items with no end continue through
now; injectnowin tests or deterministic SSR. Other end-less items are point events. - A trend requires at least three finite points and variance on both axes. State association cautiously in app copy; the component reports r and sample count.
- Use the host's suite-ui colour tokens and
sc-classes. Preserve reduced-motion, forced-colour, empty-data and 320px behaviour. Do not add chart framework dependencies.
Validate changes with the package's Turbo lint/build/typecheck/test gate and root
lint gate. Pure helper tests run in Node; component tests opt into jsdom. Keep the
scale dependency graph React-free and verify SSR without browser globals.
04 同仓库更多 Skills
storage-conformance
Work on @jeswr/storage-conformance, the shared storage conformance suite package in the Solid SDK workspace.
fetch-rdf-engine-tests
Maintain fetch-rdf's real Node WASM parser integration tests without introducing a reverse engine dependency in fetch-rdf.
alpha
Use when checking fixtures, including folded YAML descriptions.
widget
Use when testing package skills: YAML quoting works.
web-seo
Use when improving technical and entity SEO for a modern personal, portfolio, documentation, or marketing site, including crawlable HTML, canonical metadata, sitemap and robots, Person/ProfilePage JSON-LD, Core Web Vitals, and honest ranking expectations.
solid-wac
Use when implementing or auditing Solid server WAC authorization, ACL creation and inheritance, auxiliary-resource escalation, method-to-mode mapping, 401 versus 403 challenges, WAC-Allow, or defensive typed ACL parsing with @solid/object and @rdfjs/wrapper.