-
Notifications
You must be signed in to change notification settings - Fork 74
Fix horizontal bar chart bar names and tooltip display #1197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This commit fixes two issues with horizontal bar charts: 1. Bar names not showing: The backend transform_data_for_chart function was only returning xAxisData, but horizontal bar charts need yAxisData for the category axis (bar names). 2. Tooltip not working on hover: With missing axis data, tooltips could not properly display when hovering over bars. Changes: - Added yAxisData to all bar chart data transformation return values - Updated raw data bar charts to include both xAxisData and yAxisData - Updated aggregated bar charts (with/without extra dimension) to include both axis data arrays - Category data is now available for both vertical (xAxis) and horizontal (yAxis) orientations The ECharts config generator already correctly uses yAxisData for horizontal bars (line 161), so this provides the missing data. Files modified: - ddpui/core/charts/charts_service.py: Added yAxisData to transform functions for bar charts (lines 708-710, 793-797, 829-834) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
WalkthroughThe chart data transformation logic in the service layer is updated to consistently populate both xAxisData and yAxisData fields across bar, line, and pie chart types. Category data derived from x_axis values now mirrors to both axes, supporting flexible chart orientation handling. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1197 +/- ##
==========================================
- Coverage 50.98% 50.98% -0.01%
==========================================
Files 97 97
Lines 11824 11825 +1
==========================================
Hits 6029 6029
- Misses 5795 5796 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This commit fixes two issues with horizontal bar charts:
Changes:
The ECharts config generator already correctly uses yAxisData for horizontal bars (line 161), so this provides the missing data.
Files modified:
🤖 Generated with Claude Code
Summary by CodeRabbit