Skip to content

Manoj cost prediction line chart#3738

Merged
one-community merged 32 commits into
developmentfrom
Manoj_Cost_Prediction_Line_Chart
Aug 22, 2025
Merged

Manoj cost prediction line chart#3738
one-community merged 32 commits into
developmentfrom
Manoj_Cost_Prediction_Line_Chart

Conversation

@Manoj99Q
Copy link
Copy Markdown
Contributor

Description

image
image
image

Related PRS (if any):

This frontend PR is related to the OneCommunityGlobal/HGNRest#1528 backend PR. Checkout the backend too

Main changes explained:

  • Created a CostPredictionChart for full page view of the bar chart at route /bmdashboard/cost-prediction
  • Crated a card component of the same to be displayed at /bmdashboard/totalconstructionsummary under Financials
  • Added filters to select project ID and categories in the chart component.

How to test:

  1. check into current branch
  2. do npm install and npm run start:local to run this PR locally
  3. Clear site data/cache
  4. log as any user
  5. Navigate to http://localhost:3000/bmdashboard/totalconstructionsummary
  6. First verify the card view component displays a sample preview chart under Financials
  7. Click on the card view to navigate to /bmdashboard/cost-prediction route and you will get the Full page view of Cost tracking chart.
  8. By using the project ID filter and categories options; test the component retrieves the corresponding data and renders the chart accordingly

Screenshots or videos of changes:

image
image

@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 10, 2025

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 2236784
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/68a8d67d60632300076173af
😎 Deploy Preview https://deploy-preview-3738--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.

@beblicarl
Copy link
Copy Markdown
Contributor

This feature works as intended and the code is great

image image

@beblicarl beblicarl self-requested a review July 18, 2025 14:46
beblicarl
beblicarl previously approved these changes Jul 18, 2025
@PrasanthBhimana PrasanthBhimana added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Jul 23, 2025
Copy link
Copy Markdown
Contributor

@sankargalla sankargalla left a comment

Choose a reason for hiding this comment

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

I have reviewed the PR and tested the CostPredictionChart on the frontend by checking out the corresponding backend branch. The Project ID filter and category options correctly retrieve and display the relevant data. The chart renders as expected, with each category visually distinguished using different colors. As per the requirements, the X and Y axes are labeled appropriately, and hovering over the chart displays tooltips with cost values. The CostPredictionChart functions correctly in both dark and light modes.

Observations:

  1. The legend uses identical symbols for both actual and predicted costs, making it difficult to distinguish between them visually.
  2. When the graph transitions to show predicted data, the tooltip displays an empty label.
PR 3738+1528_O

sirisudheeksha
sirisudheeksha previously approved these changes Jul 25, 2025
Copy link
Copy Markdown
Contributor

@sirisudheeksha sirisudheeksha left a comment

Choose a reason for hiding this comment

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

Pulled frontend PR #3738 and ran it locally .Everything works as described
Screenshot 2025-07-25 at 12 18 52 AM
Screenshot 2025-07-25 at 12 18 35 AM

csk731
csk731 previously approved these changes Jul 26, 2025
Copy link
Copy Markdown
Contributor

@csk731 csk731 left a comment

Choose a reason for hiding this comment

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

I reviewed PR #3738 by running it locally. Everything is working as expected in both light and dark modes. No issues were found.
Screenshot 2025-07-25 at 11 19 58 PM

Screenshot 2025-07-25 at 11 19 44 PM

@guna3005
Copy link
Copy Markdown

tested backend and frontend and everything works as expected
Screenshot 2025-07-26 at 10 11 52 PM
Screenshot 2025-07-26 at 10 11 15 PM

uhakruthi1
uhakruthi1 previously approved these changes Jul 28, 2025
Copy link
Copy Markdown
Contributor

@uhakruthi1 uhakruthi1 left a comment

Choose a reason for hiding this comment

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

Screenshot 2025-07-28 at 10 32 50 AM The feature functions exactly as expected, and the code quality is excellent.

Copy link
Copy Markdown
Contributor

@ShravyaKudlu ShravyaKudlu left a comment

Choose a reason for hiding this comment

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

It looks good, but I have a few change requests:

  • The graph is currently overflowing its container.
  • Could you add a div above the Actual vs Planned section and use flex-direction: row so they display side by side?
  • Alternatively:
    • Set overflow: scroll as shown, or
    • Increase the min height of the first graph to 300px

Please choose the option that best maintains the layout and usability

Screenshot from 2025-08-05 19-59-15
Screenshot from 2025-08-05 20-03-15
Screenshot from 2025-08-05 20-07-13

Copy link
Copy Markdown
Contributor

@kanishkagarwal6101 kanishkagarwal6101 left a comment

Choose a reason for hiding this comment

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

For me the chart is not loading and is throwing error in fetching. The bar graph is overflowing, the fixes that shravya said before me sound good for that issue.
Screenshot 2025-08-07 at 1 13 59 PM
Screenshot 2025-08-07 at 1 14 13 PM

@Manoj99Q
Copy link
Copy Markdown
Contributor Author

Manoj99Q commented Aug 9, 2025

Made changes to only have card view component. Removed Fullpage view.
@kanishkagarwal6101 Can you verify whether you checked out the corresponding backend branch.

@surajmaraboina
Copy link
Copy Markdown

chart is not loading and is throwing error in fetching. The bar graph is overflowing(#3738 ).
Screenshot (1336)

@Manoj99Q
Copy link
Copy Markdown
Contributor Author

@ShravyaKudlu The bar chart is not part of my pull request. But I will try to fix the overflow issue if possible.

@one-community
Copy link
Copy Markdown
Member

Thank you all, merging!

@one-community one-community merged commit 31faf8d into development Aug 22, 2025
8 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.