-
Notifications
You must be signed in to change notification settings - Fork 1
refactor(charts): migrate components:chart, chartline to <script setup> #800
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
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 refactors the Chart and ChartLine Vue components from Options API to Composition API using <script setup> syntax, improving code organization and maintainability.
- Converted Chart.vue and ChartLine.vue to use
<script setup>with Composition API - Extracted
ChartLineColorsinterface to shared types file (src/types/chart.ts) - Created new constants file (src/constants/charts.ts) for
chartColorsarray
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/types/chart.ts | Added ChartLineColors interface definition with comprehensive documentation for color gradient properties |
| src/constants/charts.ts | New file containing chartColors constant array with color configurations for chart lines |
| src/components/events/ChartLine.vue | Migrated from Options API to Composition API with script setup, converting props, data, and computed properties |
| src/components/events/Chart.vue | Migrated from Options API to Composition API with script setup, converting props, lifecycle hooks, methods, and computed properties to their Composition API equivalents |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
beb0d81 to
e048818
Compare
e048818 to
eecb45d
Compare
refactor(components): migrate Chart components to Vue 3 Composition API - script setup
Goal: decouple chart components from Hawk so they can be moved into CodeX UI and reused across packages (e.g., NoteX and Hawk Admin).
Changes: