feat: Add bar chart, ring chart and radar chart components
English | 简体中文
PR
PR Checklist
Please check if your PR fulfills the following requirements:
- [ ] The commit message follows our Commit Message Guidelines
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
- [ ] Built its own designer, fully self-validated
PR Type
What kind of change does this PR introduce?
- [ ] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other... Please describe:
Background and solution
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
- [ ] Yes
- [ ] No
Other information
Summary by CodeRabbit
-
New Features
- Added three new chart components: Bar Chart, Ring (donut) Chart, and Radar Chart for enhanced visualization.
-
Bug Fixes / Improvements
- Updated Histogram icon and explicitly set Pie chart type to improve clarity.
-
Chores
- Standardized component metadata, sample snippets and configuration payloads for consistent integration and usage.
Walkthrough
Added three new Vue Huicharts components (TinyHuichartsBar, TinyHuichartsRing, TinyHuichartsRadar) to bundle and mock schema, updated TinyHuichartsHistogram icon to "histogram", added explicit "type": "pie" for TinyHuichartsPie, and expanded snippets, events, slots, and configure metadata across chart entries.
Changes
| Cohort / File(s) | Summary |
|---|---|
Bundle: new chart components & snippets designer-demo/public/mock/bundle.json |
Added TinyHuichartsBar, TinyHuichartsRing, TinyHuichartsRadar with full public metadata (version, npm/exportName, component, icon, description, package, script, group, priority, schema/events/slots/configure), added snippet entries and sample options payloads; changed TinyHuichartsHistogram icon to "histogram"; added explicit "type": "pie" to TinyHuichartsPie; harmonized chart entry structures. |
Mock server: public component map mockServer/src/mock/get/app-center/v1/apps/schema/1.json |
Registered TinyHuichartsBar, TinyHuichartsRing, TinyHuichartsRadar in componentMap with package @opentiny/vue-huicharts, matching exportName, destructuring: true, version 3.22.0. |
Sequence Diagram(s)
sequenceDiagram
autonumber
participant Dev as Developer
participant Bundle as bundle.json
participant Mock as mock schema (app-center)
rect rgba(135,206,235,0.12)
Note over Dev,Bundle: Add/modify chart metadata & snippets
Dev->>Bundle: Insert TinyHuichartsBar/Ring/Radar, update Histogram/Pie entries
end
rect rgba(144,238,144,0.12)
Bundle->>Mock: Add componentMap entries (exportName/package/version)
Note right of Mock: Mock server exposes updated component catalog
end
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
- Verify consistency between
bundle.jsoncomponent metadata andcomponentMapentries. - Check snippet option payload shapes and that
onReady/onReadyOnceevent definitions are correct. - Confirm package/version/exportName strings for the three new components.
Poem
🐰 I hopped through JSON fields with cheer,
Bars and Rings and Radars now appear,
A Pie declared its type, a Histogram renamed,
Snippets snug, new charts proclaimed,
📊✨ —from a rabbit, light and clear
Pre-merge checks and finishing touches
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title accurately describes the main changes: adding three new chart components (bar, ring, and radar) to the system. It is clear, specific, and directly reflects the primary purpose of the changeset. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✨ Finishing touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
📜 Recent review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between da25bdc4cb7f6d3f76a6ee106de0f001d5cf4a49 and 50983a3cb3dbfabff19b59f3e435c80977f346b8.
📒 Files selected for processing (1)
designer-demo/public/mock/bundle.json(7 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: push-check
🔇 Additional comments (6)
designer-demo/public/mock/bundle.json (6)
179-181: Histogram icon rename looks good. Icon set to "histogram" matches the component.
340-465: Bar material scaffold reads well. Group, events (onReady/onReadyOnce), and configure block are consistent with other charts.
15752-15755: Pie snippet explicit type "pie" is correct. No issues.
633-756: Ring material entry categorized under chart. Group value is correct now.
757-880: Radar material entry categorized under chart. Consistent with other charts.
15669-15675: Histogram snippet unchanged aside from icon context; OK. No action needed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.