Skip to content

SaiKrishna_adding donut chart for planned cost breakdown_frontend#4011

Merged
one-community merged 9 commits intodevelopmentfrom
saikrishna_donutChartForPlannedCostBreakdown_frontend
Feb 23, 2026
Merged

SaiKrishna_adding donut chart for planned cost breakdown_frontend#4011
one-community merged 9 commits intodevelopmentfrom
saikrishna_donutChartForPlannedCostBreakdown_frontend

Conversation

@saikrishnaraoyadagiri
Copy link
Contributor

@saikrishnaraoyadagiri saikrishnaraoyadagiri commented Sep 3, 2025

Description

Summary Dashboard: Create a Donut Chart showing Planned Cost Breakdown by Type of Expenditure (WIP Sai Krishna)

The chart should display four categories: Plumbing, Electrical, Structural, and Mechanical, each represented by a different color.
The percentage of the total cost for each category should be displayed next to it in hover text.
Include two filters:
A Project filter to view the cost breakdown for a specific project.
Frontend Requirements
Donut Chart Component:
Use chart library like Recharts, Chart.js, or Nivo.
Four fixed segments:
Plumbing
Electrical
Structural
Mechanical
Distinct color for each.
Tooltip / Hover Text:
Show:
Category Name
Planned Cost
Percentage of Total Planned Cost
Filters:
Dropdown for:
Project Filter (list of available projects)
Legend:
Color-coded legend mapping category to color.
Title:
"Planned Cost Breakdown by Type of Expenditure"
API Integration:
Fetch planned cost data based on selected project.
image

Related PRS (if any):

This frontend PR is related to the #1699 backend PR.

Main changes explained:

  • Added Plannedcostdonutchart.jsx, Plannedcostdonutchart.css, plannedcostservice.js, index.js
  • updated routes.js

How to test:

  1. check out current branch for the front end and backend PR for the backend
  2. do npm install and ... to run this PR locally
  3. Clear site data/cache
  4. log as admin user
  5. go to http://localhost:5173/planned-costs
  6. select the project from the dropdown with the data
  7. You should be able to see the donut chart
  8. On hovering the chart you should be able to see the legend and data related to the type in that legend

Screenshots or videos of changes:

Screenshot 2025-08-29 191741 Screenshot 2025-08-29 191752 Screenshot 2025-08-29 191808 Screenshot 2025-08-29 191819

@netlify
Copy link

netlify bot commented Sep 3, 2025

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 894f640
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/699b7df1ef762e0008d8b328
😎 Deploy Preview https://deploy-preview-4011--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@saikrishnaraoyadagiri saikrishnaraoyadagiri changed the title feat: adding donut chart for planned cost breakdown_frontend SaiKrishna_adding donut chart for planned cost breakdown_frontend Sep 30, 2025
@one-community one-community added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Oct 6, 2025
@beblicarl beblicarl self-requested a review October 9, 2025 20:26
Copy link

@ShradhaMBhadrannavar ShradhaMBhadrannavar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Followed the test steps - selected a project from the dropdown (with available data) multiple times, but the donut chart didn’t render. Attached screenshots for your reference. Please review.
Screenshot 2025-10-11 at 15 28 13
Screenshot 2025-10-11 at 15 34 54
Screenshot 2025-10-11 at 15 35 11
Screenshot 2025-10-11 at 15 35 33

@saikrishnaraoyadagiri saikrishnaraoyadagiri force-pushed the saikrishna_donutChartForPlannedCostBreakdown_frontend branch from 45412b6 to f75aa25 Compare October 12, 2025 03:38
@sonarqubecloud
Copy link

@saikrishnaraoyadagiri
Copy link
Contributor Author

@ShradhaMBhadrannavar , Did you checkout the backend branch mentioned in the description to test this frontend PR ?

@ShradhaMBhadrannavar
Copy link

@ShradhaMBhadrannavar , Did you checkout the backend branch mentioned in the description to test this frontend PR ?

yes, I followed every step mentioned in the 'How to test' section.

@saikrishnaraoyadagiri
Copy link
Contributor Author

@ShradhaMBhadrannavar , I didn't add it in the How to test because the backend PR number is already mentioned in the Related PR's section. So you might have not checked out the backend PR. So Please test this frontend with checking out the mentioned backend PR

@saikrishnaraoyadagiri saikrishnaraoyadagiri force-pushed the saikrishna_donutChartForPlannedCostBreakdown_frontend branch 2 times, most recently from 0627ae7 to 5115660 Compare November 15, 2025 00:31
@sonarqubecloud
Copy link

@saikrishnaraoyadagiri
Copy link
Contributor Author

@ShradhaMBhadrannavar , Did you checkout the backend branch mentioned in the description to test this frontend PR ?

yes, I followed every step mentioned in the 'How to test' section.

@ShradhaMBhadrannavar It is due to the change in db.js file, I fixed it, it will work now, please review

Copy link

@Anusha-Gali Anusha-Gali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Sai Krishna,

I have tried to review your PR locally and have identified the below issues:

  • The frontend does not load as it appears to be in your images.
  • It is very difficult to find the project due to the huge number of list, it would be helpful if you could enable typing and the dropdown then reducing the projects based on characters typed
  • The page does not appear to have dark mode enabled
  • The total of the percentages crosses 100 in the donut chart
Screenshot 2025-12-11 at 1 06 16 AM Screenshot 2025-12-11 at 1 08 54 AM Screenshot 2025-12-11 at 1 09 01 AM Screenshot 2025-12-11 at 1 10 32 AM

@saikrishnaraoyadagiri saikrishnaraoyadagiri force-pushed the saikrishna_donutChartForPlannedCostBreakdown_frontend branch 2 times, most recently from 63ff4a3 to a0b2b6b Compare February 22, 2026 20:22
@sonarqubecloud
Copy link

@saikrishnaraoyadagiri
Copy link
Contributor Author

@Anusha-Gali , Fixed the mentioned issues, please review it.

Copy link

@Anusha-Gali Anusha-Gali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Sai Krishna,

Thanks for fixing all the issues, i have reviewed your PR again and it works as per all the requirements mentioned in both the modes.

Image Image Image Image Image

@one-community
Copy link
Member

Thank you all, merging!

@one-community one-community merged commit f46a014 into development Feb 23, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants