Repository navigation
Shreevaths taking over for Vamsidhar - Create Line Graph For Cost Breakdown by Expenditure 20 - #3906
ReinaT5678 wants to merge 39 commits into
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Referred the backend PR #[1357](OneCommunityGlobal/HGNRest#1357 backend PR)
|
…kdown-by-expenditure-20
…kdown-by-expenditure-20
aseemdeshmukh
left a comment
There was a problem hiding this comment.
Works perfect! (Referred BE PR 1357)
- Tested in light and dark mode. Everything is clearly visible.
- Filters work properly.
- Getting the error when start date is greater than end date; which is expected
- Attached screenshots
NOTE (Whoever is getting Error 404 and the graph is not loading; check if the frontend API hitting the backend. Make sure your .env file has the same port as backend, and in the browser when loading the website check the API.)
…tional-deps error
…al chain, negated condition, duplicate CSS selector
|
kzou55
left a comment
There was a problem hiding this comment.
Hi Saurabh,
I ran and tested the PR using the current branch and the associated backend.
However, I was unable to verify the implementation.
Issues:
…ighestGoodNetworkApp into reina-create-line-graph-for-cost-breakdown-by-expenditure-20
|
…ost-breakdown-by-expenditure-20
…ighestGoodNetworkApp into reina-create-line-graph-for-cost-breakdown-by-expenditure-20
…ighestGoodNetworkApp into reina-create-line-graph-for-cost-breakdown-by-expenditure-20 pull
There was a problem hiding this comment.
Hi Shreevaths,
I ran and tested the PR locally alongside its associated backend.
Verified
- Lines for Structural, Mechanical, Electrical, and Plumbing present and each a different color
- Axes
- X Axis the Month and Year
- Y Axis the Costs
- Filters can be done by Project and Dates(From and To)
- Color coded legend present
- Title of the Graph present being "Cost Breakdown by Type of Expenditure[project filter])"
- Dark Mode looks good
Issue/Clarification
- The PR description mentions that mock data is currently being used. However, based on my testing, it appears that the frontend initially retrieves the entire mock expenditure dataset from the backend, and the filter dropdown then filters the data on the frontend rather than making a new request to the backend for the filtered data. I observed that changing the filter did not result in any new network requests in the browser's Network tab.
Could you clarify if this is the intended behavior for the current implementation, or if the filter is expected to call the corresponding backend endpoint to retrieve the filtered data?
|
Hello @kzou55 , please check this. Clarification - -Full dataset already required: date-range bounds (getDateRangeFromData) are computed across all records, so a full fetch happens on load regardless of filter state.
|
…ighestGoodNetworkApp into reina-create-line-graph-for-cost-breakdown-by-expenditure-20
kzou55
left a comment
There was a problem hiding this comment.
Hi Shreevaths,
I ran and tested the PR locally again alongside its associated backend.
Verified
-
Lines for Structural, Mechanical, Electrical, and Plumbing present and each a different color
-
Axes
- X Axis the Month and Year
- Y Axis the Costs
-
Filters can be done by Project and Dates(From and To)
- Start Date correctly cannot be after end date
-
Color coded legend present
-
Title of the Graph present being "Cost Breakdown by Type of Expenditure[project filter])"
-
Dark Mode looks good
Recording.2026-09-09.173949.mp4
Clarification
I confirmed that the graph renders the expected data and that the project/date filters work as expected. However, I noticed that the current implementation filters the data on the frontend after fetching /api/bm/expenditure once, rather than fetching the cost data from the backend based on the selected project and date range as described in requirement #6 (API integration).
Could you clarify whether this requirement has changed, or if the expectation is still for the backend to handle the project/date filtering?

…ighestGoodNetworkApp into reina-create-line-graph-for-cost-breakdown-by-expenditure-20
kzou55
left a comment
There was a problem hiding this comment.
HI Shreevaths,
I ran and tested the PR locally again alongside its associated backend.
Verified
-
Lines for Structural, Mechanical, Electrical, and Plumbing present and each a different color
-
Axes
- X Axis the Month and Year
- Y Axis the Costs
-
Filters can be done by Project and Dates(From and To)
-
Start Date correctly cannot be after end date
-
Color coded legend present
-
Title of the Graph present being "Cost Breakdown by Type of Expenditure
-
Dark Mode looks good
-
Changes from previous review confirmed
- Filters(Project, From, To) are now done by the backend rather than the frontend
Issues
- Calendar Date Picker has some inconsistent behavior in Light/Dark Mode. In dark mode, the dates(except for the future dates) are look clickable(no dull greyed out color to make it look like its an invalid click). However, in light mode, dates not in the current month are greyed out.
- When using the date picker, the endpoint is called each time I navigate between months, even though I’m only browsing the calendar. Could we update this so the endpoint is called only after a date is actually selected? This would avoid unnecessary API requests while navigating through the months.
Recording.2026-10-03.214752.mp4
…ighestGoodNetworkApp into reina-create-line-graph-for-cost-breakdown-by-expenditure-20
|


















Description
A frontend line graph chart that shows time in months (x-axis) and cost (y-axis) of projects. The chart can be filtered by projects and by date range.
Related PRS (if any):
This frontend PR is related to the #1357 backend PR.
This is a redo of #3458
…
Main changes explained:
…
How to test:
Screenshots or videos of changes:
Screen.Recording.2025-08-15.at.10.19.06.PM.mov