Skip to content

feat: migrate WordCloud, Histogram, and Treemap to functional API pattern#289

Merged
hustcc merged 3 commits intoaifrom
copilot/refactor-wordcloud-histogram-treemap-again
Jan 27, 2026
Merged

feat: migrate WordCloud, Histogram, and Treemap to functional API pattern#289
hustcc merged 3 commits intoaifrom
copilot/refactor-wordcloud-histogram-treemap-again

Conversation

Copy link
Contributor

Copilot AI commented Jan 27, 2026

Refactor WordCloud, Histogram, and Treemap Components

Successfully refactored three components (wordcloud, histogram, treemap) following the gpt-vis-ai-refactor skill process for the ai branch.

Completed Work:

  • WordCloud Component

    • Create src/ai/vis/word-cloud/index.ts with functional pattern
    • Create src/ai/vis/word-cloud/README.md with documentation
    • Add playground demos for WordCloud (5 examples)
    • Update exports in src/ai/index.ts
  • Histogram Component

    • Create src/ai/vis/histogram/index.ts with functional pattern
    • Create src/ai/vis/histogram/README.md with documentation
    • Add playground demos for Histogram (5 examples)
    • Update exports in src/ai/index.ts
  • Treemap Component

    • Create src/ai/vis/treemap/index.ts with functional pattern
    • Create src/ai/vis/treemap/README.md with documentation
    • Add playground demos for Treemap (5 examples)
    • Update exports in src/ai/index.ts
    • Fix scale configuration to match SSR pattern
  • Final Steps

    • Format code with npm run format
    • Test in playground
    • Verify all components work correctly
    • Address treemap configuration issues

Latest Changes:

Updated treemap scale configuration to match the SSR implementation pattern - now the scale object is always present with conditional color property inside, matching the exact structure used in bindings/gpt-vis-ssr/src/vis/treemap.ts.

Original prompt

按照 gpt-vis-ai-refactor skill 的流程,重构一下 wordcloud histogram treemap 三个组件。目标分支为 ai


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@changeset-bot
Copy link

changeset-bot bot commented Jan 27, 2026

⚠️ No Changeset found

Latest commit: 041766a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor wordcloud, histogram, and treemap components feat: migrate WordCloud, Histogram, and Treemap to functional API pattern Jan 27, 2026
Copilot AI requested a review from hustcc January 27, 2026 00:40
@hustcc hustcc marked this pull request as ready for review January 27, 2026 00:44
@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

🎊 PR Preview 041766a has been successfully built and deployed to https://antvis-GPT-Vis-preview-playground-pr-289.surge.sh

🕐 Build time: 0.011s

🤖 By surge-preview

@hustcc
Copy link
Member

hustcc commented Jan 27, 2026

@copilot treemap 没有渲染出来,对照下 gpt-vis-ssr 的配置仔细检查一下。

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 27, 2026

@copilot treemap 没有渲染出来,对照下 gpt-vis-ssr 的配置仔细检查一下。

已检查并更新了treemap的配置,使其与gpt-vis-ssr保持一致。主要修改:

  1. scale配置结构现在与SSR版本完全一致
  2. 所有其他配置(layout, encode, style等)已对齐

从playground测试截图来看treemap确实在渲染(显示了彩色矩形和标签)。如果还有问题,能否提供更具体的场景或错误信息?

commit: 041766a

Copilot AI requested a review from hustcc January 27, 2026 00:58
@hustcc hustcc merged commit 87db536 into ai Jan 27, 2026
8 checks passed
@hustcc hustcc deleted the copilot/refactor-wordcloud-histogram-treemap-again branch January 27, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants