Thank you for your interest in contributing to data-chart. This guide will help you get started.
Prerequisites: Node.js >= 24 and pnpm.
pnpm install # Install dependencies
pnpm dev # Start dev server (examples page)
pnpm test # Run tests
pnpm build # Build library to dist/
pnpm lint # Run linter (oxlint)
pnpm fmt # Format code (oxfmt)Refer to CLAUDE.md for the full style guide. Key points:
- TypeScript strict mode -- no
any, noascasts unless absolutely necessary. - No classes -- use functions and closures.
- No
default exportin internal modules. Onlyindex.tshas a default export. - Prefer
constoverlet. - CSS custom property prefix:
--dc- - CSS class prefix:
data-chart- - HTML attribute prefix:
data-chart-
Follow this format for commit messages:
feat: add horizontal bar chart support
fix: correct pie slice angle calculation
docs: add animation page for data-anim integration
test: add parser edge case for currency strings
chore: update pnpm to 10.x
- One feature or fix per PR.
- Include tests for any new functionality or bug fix.
- Run
pnpm lintandpnpm testbefore submitting. - Keep the bundle size at or below 6 KB gzip (
pnpm sizeto check).
- Visit the Documentation to view the full API reference.
- Try the Playground to experiment with charts interactively.