Closed Harman-singh-waraich closed 1 month ago
This update enhances the web application by introducing a new chart to the home page, showcasing court case statistics. It includes adding the chartjs-plugin-datalabels
library, extending the homepage query to fetch court data, and creating a new React component for displaying a bar chart of cases by courts. Additionally, modifications to existing chart components add new configurations and options for displaying the data more effectively.
File Path | Change Summary |
---|---|
web/package.json |
Added "chartjs-plugin-datalabels": "^2.2.0" to the dependencies. |
web/src/hooks/queries/useHomePageQuery.ts |
Added courts field with name and numberDisputes attributes to the homePageQuery . |
web/src/pages/Home/CourtOverview/CasesByCourtsChart.tsx |
Introduced CasesByCourtsChart component and related exports for rendering a bar chart. |
web/src/pages/Home/CourtOverview/Chart.tsx |
Added imports and modified logic to include the new CasesByCourtsChart based on selected options. |
web/src/pages/Home/CourtOverview/TimeSeriesChart.tsx |
Added new tooltip configuration to the TimeSeriesChart component. |
sequenceDiagram
participant User
participant HomePage
participant useHomePageQuery
participant CasesByCourtsChart
User->>HomePage: Navigate to HomePage
HomePage->>useHomePageQuery: Fetch court data
useHomePageQuery-->>HomePage: Return court data
HomePage->>CasesByCourtsChart: Render CasesByCourtsChart with data
CasesByCourtsChart-->>User: Display bar chart of cases by courts
The courts now speak in bars so bright, With data labels shining in the light. A query fetches, a chart displays, The cases counted, in new ways. 🎨📊✨ For justice now has colors bold, In stats and graphs, its story told.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Name | Link |
---|---|
Latest commit | a7f7b6517a77253e7988112e5ca4e7b9f00a2502 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2/deploys/66950b4d6aecc10008a3cc52 |
Deploy Preview | https://deploy-preview-1650--kleros-v2.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Name | Link |
---|---|
Latest commit | a7f7b6517a77253e7988112e5ca4e7b9f00a2502 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-neo/deploys/66950b4dadf3520008c6b8f0 |
Deploy Preview | https://deploy-preview-1650--kleros-v2-neo.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Name | Link |
---|---|
Latest commit | a7f7b6517a77253e7988112e5ca4e7b9f00a2502 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-university/deploys/66950b4dadf3520008c6b8ec |
Deploy Preview | https://deploy-preview-1650--kleros-v2-university.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Issues
1 New issue
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Code Climate has analyzed commit a7f7b651 and detected 2 issues on this pull request.
Here's the issue category breakdown:
Category | Count |
---|---|
Complexity | 2 |
View more on Code Climate.
Adds cases by court chart
PR-Codex overview
The PR adds a new plugin
chartjs-plugin-datalabels
to display data labels in charts. It also introduces a new chart componentCasesByCourtsChart
to show cases per court.Detailed summary
chartjs-plugin-datalabels
for data labels in chartsCasesByCourtsChart
component to display cases per courtSummary by CodeRabbit
New Features
courts
field to the homepage query to fetch court names and dispute counts.Enhancements
Dependencies
chartjs-plugin-datalabels
to enable data labels on charts.