Commit 3dd53e8
authored
feat(web): Dashboard supports Pie Chart visualization (#2709)
# Description
Implement Pie Chart visualization support in dashboard components.
This PR adds pie chart visualization capability to the dashboard,
allowing users to:
- Render pie charts in the chat_dashboard mode
- Preview pie charts in the chat_dashboard editor mode
## Implementation Details
- Added new file: `web/components/chart/pie-chart.tsx` that implements
pie chart rendering logic using G2
- Modified `web/components/chart/index.tsx` to integrate the pie chart
component into the dashboard chart rendering flow
- Added animation effects, hover interactions, and improved legend
display
- Fixed interaction bugs to ensure smooth visualization
# How Has This Been Tested?
Testing procedure included:
1. Creating datasets with category-based data suitable for pie charts
2. Verifying pie chart visualization in chat_dashboard mode
3. Confirming preview functionality works correctly in the editor mode
4. Testing interactions: hover effects, animations, and legend display
All tests confirm the feature works as expected with proper
visualization of categorical data proportions.
# Snapshots:


# Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have already rebased the commits and make the commit message
conform to the project standard.
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] Any dependent changes have been merged and published in downstream
modules
Fixes #2708File tree
132 files changed
+848
-299
lines changed- packages/dbgpt-app/src/dbgpt_app/static/web
- 404
- _next
- data/AsMlMcJ1t-1PSN4NnUfK6/construct/prompt
- static
- 92PcYaWoHwuIxaEr7akRs
- AsMlMcJ1t-1PSN4NnUfK6
- chunks
- pages
- construct
- app
- extra/components
- auto-plan
- flow
- knowledge
- prompt
- knowledge
- mobile
- chat/components
- css
- chat
- construct
- agent
- app
- components/create-app-modal
- extra
- components
- AwelLayout
- NativeApp
- RecommendQuestions
- auto-plan
- DetailsCard
- PromptSelect
- ResourceContentV2
- ResourceContent
- ResourcesCardV2
- ResourcesCard
- config
- database
- dbgpts
- flow
- canvas
- libro
- knowledge
- chunk
- models
- prompt
- add
- edit
- evaluation
- knowledge/graph
- mobile/chat
- components
- ChatDialog
- Content
- DislikeDrawer
- Feedback
- Header
- InputContainer
- ModelSelector
- OptionIcon
- Resource
- Thermometer
- web/components/chart
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
132 files changed
+848
-299
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 0 additions & 1 deletion
This file was deleted.
0 commit comments