-
Notifications
You must be signed in to change notification settings - Fork 9
Data characterisation chart axis optimisation #1692
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
base: develop
Are you sure you want to change the base?
Data characterisation chart axis optimisation #1692
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances chart axis formatting capabilities by allowing dynamic number formatting functions. The changes enable better display of large numbers on chart axes by abbreviating them (e.g., "10K", "1.5M") while maintaining flexibility for custom formatting logic.
Changes:
- Extended
yAxisFormattype to accept either a string or a formatting function - Added
formatLargeNumberutility function to abbreviate large numbers with K/M/B suffixes - Applied the new formatter to the ObservationPeriodObservedByMonthChart component
- Removed hardcoded grid positioning in LineChart to improve automatic layout
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| ui/apps/portal/src/plugins/SystemAdmin/DQD/types.ts | Extended LineChartFormatConfig to support function-based yAxisFormat |
| ui/apps/portal/src/components/Charts/util.ts | Updated getAxisNameGap to handle function formatters and added formatLargeNumber utility |
| ui/apps/portal/src/components/Charts/SourceKeys/ObservationPeriod/ObservationPeriodObservedByMonthChart/ObservationPeriodObservedByMonthChart.tsx | Applied formatLargeNumber to y-axis formatting |
| ui/apps/portal/src/components/Charts/Common/LineChart.tsx | Removed hardcoded left/bottom grid values, relying on containLabel |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ui/apps/portal/src/components/Charts/Reports/ObservationPeriod/ObservationPeriod.tsx
Outdated
Show resolved
Hide resolved
e6d89ce to
abcf991
Compare
abcf991 to
08ad532
Compare
Merge Checklist
Please cross check this list if additions / modifications needs to be done on top of your core changes and tick them off. Reviewer can as well glance through and help the developer if something is missed out.
developbranch)