Skip to content

Adithya Improve Expense Chart#5301

Open
adithya-6101 wants to merge 4 commits into
developmentfrom
adithya_improve_expense_chart
Open

Adithya Improve Expense Chart#5301
adithya-6101 wants to merge 4 commits into
developmentfrom
adithya_improve_expense_chart

Conversation

@adithya-6101
Copy link
Copy Markdown
Contributor

@adithya-6101 adithya-6101 commented May 28, 2026

Description

This PR enhances the "Planned vs Actual Cost" graph on the Financials dashboard to provide immediate, actionable insights into project budgets. It introduces dynamic variance calculations, custom tooltips, and clear visual indicators for over/under-budget status.

image

Related PRs (if any):

Main changes explained:

  • Variance Indicators: Added dynamic calculations to determine cost variance (Actual - Planned). The chart now renders positive variance (Over Budget) in red and negative variance (Under Budget) in green.
  • Custom Tooltips: Built a custom Recharts tooltip that cleanly displays the specific Planned cost, Actual cost, Variance amount, and Variance percentage.
  • Dark Mode Compatibility: Configured the layout and tooltip rendering to seamlessly inherit the darkMode state from the parent component.
    • Props Validation: Added prop-types validation for active, payload, label, darkMode, and nested payload structures to ensure data reliability.

How to test:

  1. Checkout Branch: git checkout adithya_improve_expense_chart
  2. Setup: Run npm install and npm run start:local.
  3. Navigation Test:
    • Navigate to BM Dashboard > Total Construction Summary (or the relevant Weekly Project Summary page).
    • Locate the Planned vs Actual Cost graph under the Financials section.
  4. Functionality Test:
    • Hover over the bars to verify the custom tooltip displays the correct Planned, Actual, and Variance data.
    • Adjust the Project, Category, and Date filters. Ensure the graph updates dynamically and displays "No data available" when no matches are found.

Screenshots or videos of changes:

Fix.Actual.vs.planned.cost.graph.visuals.mp4

@netlify
Copy link
Copy Markdown

netlify Bot commented May 28, 2026

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit ca2e7e1
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/6a220eb6db092f0009d1e6a2
😎 Deploy Preview https://deploy-preview-5301--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 4, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant