Skip to content

fix: Add DefaultValue to Chart Properties#1760

Merged
hexqi merged 3 commits intoopentiny:developfrom
xuanlid:fix/bundle-defaultValue
Feb 4, 2026
Merged

fix: Add DefaultValue to Chart Properties#1760
hexqi merged 3 commits intoopentiny:developfrom
xuanlid:fix/bundle-defaultValue

Conversation

@xuanlid
Copy link
Contributor

@xuanlid xuanlid commented Feb 3, 2026

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
    • Many UI and chart components now include comprehensive built-in default values and sample datasets (charts, tables, forms, navigation, badges, tags, layouts, etc.), enabling immediate rendering and faster prototyping with minimal configuration.
    • Default styling, labels, axes, legends and common interaction settings are prepopulated for consistent out-of-the-box visuals.

@github-actions github-actions bot added the bug Something isn't working label Feb 3, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 3, 2026

Walkthrough

Numerous component schemas in designer-demo/public/mock/bundle.json were updated to provide explicit, structured defaultValue objects and arrays (replacing simple placeholders) across charts, forms, layout, navigation, and display components to supply ready-to-render sample configurations.

Changes

Cohort / File(s) Summary
Bundle schema (all components)
designer-demo/public/mock/bundle.json
Expanded and added many defaultValue entries across chart components (line, histogram, pie, ring, radar, waterfall, etc.), form controls, layout (TinyLayout, TinyRow, TinyCol), tables/pagers, navigation (tabs, breadcrumb, timeline), display widgets (card, skeleton, progress, badge, tag, statistic), and miscellaneous UI controls. Replaced placeholder strings/empty objects with nested sample datasets, axes/legend configs, style objects, item arrays, validation rules, and event defaults. Event handler signatures retained but often set to empty defaults.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐇 I hop through keys and stitch a scene,
Default datasets crisp and clean,
Charts hum softly, tabs align,
Cards and tables set to shine,
A demo garden, prim and green. 🌿

🚥 Pre-merge checks | ✅ 3
✅ 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 reflects the main change: adding default values to properties across numerous components in bundle.json, with the focus on chart components as the primary example.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@designer-demo/public/mock/bundle.json`:
- Around line 4531-4555: In the legend defaultValue object, rename the incorrect
property "itemWeight" to the correct ECharts property "itemWidth" so the legend
renders properly; locate the "defaultValue" object that contains "show",
"position", "itemGap", "orient", "reverseEvent", "selectedMode", "icon",
"itemHeight", "itemWeight", "textStyle" and replace "itemWeight" with
"itemWidth".
- Around line 4191-4200: The JSON defaultValue object has reversed interval
constraints—minInterval is 12 while maxInterval is 8—violating ECharts'
requirement that minInterval ≤ maxInterval; update the defaultValue object's
minInterval and maxInterval so minInterval ≤ maxInterval (e.g., set
"minInterval": 8 and "maxInterval": 12 or otherwise choose appropriate values)
for the Percent(%) axis entry to ensure valid tick calculation.

@xuanlid xuanlid changed the title fix: Add chart property defaults fix: Adding Default Values to Chart Properties Feb 3, 2026
@xuanlid xuanlid changed the title fix: Adding Default Values to Chart Properties fix: Add DefaultValue to Chart Properties Feb 3, 2026
@hexqi hexqi added this to the v2.10.0 milestone Feb 4, 2026
@hexqi hexqi merged commit 1e8cd29 into opentiny:develop Feb 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants