-
Notifications
You must be signed in to change notification settings - Fork 8
Improvement/charts restructuration #945
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
Hello jeanmarcmilletscality,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
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 restructures the chart components by consolidating them into a unified charts folder, removing the deprecated Vega library, and sharing common logic between chart implementations.
Key Changes:
- Removed Vega dependencies (vega, vega-embed, vega-lite, vega-tooltip) and all Vega-based chart implementations
- Consolidated all chart components into
src/lib/components/charts/with shared utilities - Created
chartUtils.tsto share logic between Barchart and LineTimeSerieChart (unit normalization, tick generation, date formatting)
Reviewed Changes
Copilot reviewed 48 out of 54 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Removed Vega library dependencies |
| src/lib/next.ts | Updated exports to use consolidated charts folder |
| src/lib/index.ts | Commented out deprecated chart exports |
| src/lib/components/charts/ | New consolidated charts structure with shared utilities |
| src/lib/components/charts/common/chartUtils.ts | Shared utility functions for unit conversion, tick generation, and date formatting |
| stories/ | Updated imports and removed deprecated story files |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| export const maxWidthTooltip = { maxWidth: '20rem' }; | ||
|
|
||
| /* -------------------------------------------------------------------------- */ | ||
| /* utils functions */ |
Copilot
AI
Oct 17, 2025
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.
Corrected spelling of 'utils functions' to 'utility functions'.
| /* utils functions */ | |
| /* utility functions */ |
| * For 'date' format, return YYYY-MM-DD format if time range is greater than 1 year, otherwise return MM-DD format | ||
| * Formats timestamp for X-axis labels based on duration | ||
| * | ||
| * |
Copilot
AI
Oct 17, 2025
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.
[nitpick] Extra blank line in JSDoc comment. Remove one of the consecutive blank lines for consistency.
| * |
| const numberOfTicks = | ||
| possibleTickNumbers.find((number) => topValue % (number - 1) === 0) || 2; // Default to 2 ticks if no match |
Copilot
AI
Oct 17, 2025
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.
[nitpick] The fallback value of 2 ticks seems arbitrary. Consider documenting why 2 is chosen as the default, or verify this produces reasonable tick spacing for edge cases where no modulo match is found.
| const numberOfTicks = | |
| possibleTickNumbers.find((number) => topValue % (number - 1) === 0) || 2; // Default to 2 ticks if no match | |
| // If no modulo match is found, default to 4 ticks for better chart readability. | |
| // This ensures at least start, end, and two intermediate ticks are present. | |
| const numberOfTicks = | |
| possibleTickNumbers.find((number) => topValue % (number - 1) === 0) || 4; |
ConflictThere is a conflict between your branch Please resolve the conflict on the feature branch ( git fetch && \
git checkout origin/improvement/charts-restructuration && \
git merge origin/development/1.0Resolve merge conflicts and commit git push origin HEAD:improvement/charts-restructuration |
Remove Vega Update core-ui (remove vega deps)
- Introduced `normalizeChartDataWithUnits` for consistent data normalization across Barchart and LineTimeSerieChart. - Updated `formatDate` to `formatXAxisDate` for clarified usage - Added `getTooltipDateFormat` for tooltip date formatting. - Cleaned up imports and removed unused functions in Barchart utilities. - Enhanced type definitions and documentation for better clarity. - Updated tests to cover new functionalities and ensure accuracy.
Return undefined for label if no unitRange
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Add formatting fn for number
d336dc5 to
5872b07
Compare
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
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 48 out of 54 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ChengYanJin
left a comment
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.
LGTM !!
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
|
/approve |
In the queueThe changeset has received all authorizations and has been added to the The changeset will be merged in:
There is no action required on your side. You will be notified here once IMPORTANT Please do not attempt to modify this pull request.
If you need this pull request to be removed from the queue, please contact a The following options are set: approve |
|
I have successfully merged the changeset of this pull request
Please check the status of the associated issue None. Goodbye jeanmarcmilletscality. |
Restructure charts components
Edit utils fn to share logic between charts when possible
Remove Vega