

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# CLAUDE.md23This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.45## Project Overview67FL Chart is a highly customizable Flutter chart library supporting 6 chart types: Line, Bar, Pie, Scatter, Radar, and Candlestick. Single-package Flutter library (not a monorepo).89## Common Commands1011```bash12make sure # Run tests + checkstyle (use before pushing)13make runTests # flutter test14make analyze # flutter analyze15make checkFormat # Verify formatting (dry run)16make format # Auto-format code17make checkstyle # analyze + format check18make codeGen # Generate mock files: dart run build_runner build --delete-conflicting-outputs19flutter test test/chart/line_chart/line_chart_painter_test.dart # Run a single test file20```2122## Architecture2324### Per-Chart Pattern2526Every chart type in `lib/src/chart/` follows a consistent structure:27- `{type}_chart.dart` — Widget (extends `ImplicitlyAnimatedWidget` for built-in animations)28- `{type}_chart_data.dart` — Data classes (extend `BaseChartData` or `AxisChartData`)29- `{type}_chart_painter.dart` — Canvas drawing logic (extends `BaseChartPainter`)30- `{type}_chart_renderer.dart` — Rendering widget that builds the custom painter31- `{type}_chart_helper.dart` — Chart-specific utility functions3233### Class Hierarchy3435```36BaseChartData37├── AxisChartData (charts with X/Y axes)38│ ├── LineChartData39│ ├── BarChartData40│ ├── ScatterChartData41│ └── RadarChartData42├── PieChartData43└── CandlestickChartData44```4546Painters follow the same hierarchy: `BaseChartPainter` → `AxisChartPainter` → specific painters.4748### Key Design Decisions4950- **CanvasWrapper** (`lib/src/utils/canvas_wrapper.dart`): All drawing goes through this proxy instead of `Canvas` directly, enabling unit testing of paint logic with Mockito.51- **PaintHolder**: Holds current data, target data, text scaler, and virtual rect — passed to painters for rendering and animation interpolation.52- **Implicit animations**: Charts use `ImplicitlyAnimatedWidget` with `*DataTween` classes. Default: 150ms linear.53- **Equatable**: All data classes use `equatable` for value equality.54- **Lerp**: Data models must implement a `lerp()` method to enable smooth implicit animations between states. See `lib/src/utils/lerp.dart` for helpers.55- **Theme-aware text styles**: When rendering text in painters, always use `Utils().getThemeAwareTextStyle(context, style)` instead of hardcoded fallback `TextStyle` values. This merges user-provided styles with the app's theme.5657### Touch System5859Each chart type defines `*TouchData` and uses `FlTouchEvent` base class. Touch callbacks are configured in the chart data classes.6061## Testing6263Tests mirror the `lib/` structure under `test/`. Each chart has tests for data, painter, renderer, and helper. Painter tests mock `CanvasWrapper` to verify drawing calls.6465Key test utilities:66- `test/helper_methods.dart` — Path/RRect equality helpers67- `test/chart/data_pool.dart` — Shared mock data68- `*.mocks.dart` files are generated by Mockito (run `make codeGen` to regenerate)6970## Code Style7172- Uses `very_good_analysis` linter (strict, with some relaxed rules in `analysis_options.yaml`)73- `public_member_api_docs` is disabled — public API docs are not enforced74- `lines_longer_than_80_chars` is disabled75- Generated `*.mocks.dart` files are excluded from analysis7677## PR Conventions7879PR titles must follow Conventional Commits: `<type>: <Subject>` (e.g., `feat: Add tooltip support`). Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert. Breaking changes use `!` (e.g., `feat!: Change API`). Subject starts with a capital letter.80
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| csells/dotprompt_dartCLAUDE.md · 5 | CLAUDE.md | testlint-formatarchtypes+4 | 100/100 | 14 days ago | |
| microsoft/playwrightCLAUDE.md · 95k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 7 days ago | |
| nimbalyst/nimbalystpackages/android/CLAUDE.md · 1.5k | CLAUDE.md | setupbuildstylearch+2 | 100/100 | 14 days ago | |
| lollipopkit/flutter_server_boxCLAUDE.md · 8.5k | CLAUDE.md | buildteststylearch+2 | 98/100 | 14 days ago | |
| supabase/supabase.claude/CLAUDE.md · 108k | CLAUDE.md | testlint-formatstylearch+1 | 97/100 | 14 days ago | |
| we-promise/sureCLAUDE.md · 9.5k | CLAUDE.md | setuptestlint-formatstyle+11 | 93/100 | 13 days ago | |
| manaflow-ai/cmuxCLAUDE.md · 26k | CLAUDE.md | setupbuildteststyle+4 | 93/100 | today | |
| jiangtian616/JHenTaiCLAUDE.md · 5.4k | CLAUDE.md | buildlint-formatarchdependencies+2 | 86/100 | 11 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/imanneo-fl-chart-claude)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.