Skip to content

Aseem - Phase 2 - Improve filters planned vs actual cost chart#4310

Closed
aseemdeshmukh wants to merge 12 commits into
developmentfrom
aseem-improve-filters-plannedvsactual-costchart
Closed

Aseem - Phase 2 - Improve filters planned vs actual cost chart#4310
aseemdeshmukh wants to merge 12 commits into
developmentfrom
aseem-improve-filters-plannedvsactual-costchart

Conversation

@aseemdeshmukh

Copy link
Copy Markdown
Contributor

Description

TaskDescription-ImproveFiltersPlannedActualCost

Related PRS (if any):

NA

Main changes explained:

  • Deleted ExpectedVsActualBarChart.css to keep consistency with the new requirement of having module.css
  • Added ExpectedVsActualBarChart.module.css style sheet consisting of styles related to ExpenseBarChart.
  • Updated ExpenseBarChart.jsx, to make UI changes in the actual vs planned bar chart.

How to test:

  1. check into current branch
  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:3000/bmdashboard/totalconstructionsummary
  6. go to "Financials"
  7. verify if :
    a) tooltips are working properly for the bars in the graph
    b) text is readable
    c) reset filter button works
  8. verify this new feature works in dark mode

Screenshots or videos of changes:

Note:

Only new functionalities added in this PR is 1) Adding tooltips after hovering over the bars 2) Reset button to reset all the available filters.
Other changes made are only UI changes for the existing functionality.

ImproveFiltersPlannedActualCostDemo

ImproveFiltersUIPlannedVsActual-demo.mp4

@netlify

netlify Bot commented Nov 1, 2025

Copy link
Copy Markdown

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 6fa518a
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/697435ce520e6400087ddd21
😎 Deploy Preview https://deploy-preview-4310--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.

@sonarqubecloud

sonarqubecloud Bot commented Nov 1, 2025

Copy link
Copy Markdown

@aseemdeshmukh aseemdeshmukh added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Nov 4, 2025
@one-community one-community changed the title Aseem improve filters planned vs actual cost chart Aseem - Phase 2 - Improve filters planned vs actual cost chart Nov 10, 2025

@Sriamshreddy000 Sriamshreddy000 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi Aseem,
I tested this PR locally, logged in as admin and navigated to Dashboard/TotalConstructionSummary and "Financials". The UI loads correctly, and both new features, the tooltips on bar hover and the “Reset Filter” button are working as expected. The text is clear and readable, and the chart displays properly in both light and dark modes. Everything looks good from my side.

I'm attaching screenshots for reference.
Screenshot 2025-11-13 at 12 42 27 PM
Screenshot 2025-11-13 at 12 49 12 PM

@smohansatyaram smohansatyaram left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi Aseem, I tested this PR locally. The UI updates look good, and both the tooltip hover and the reset filter button are working properly. The labels/text are readable, and the bar chart displays correctly in both light and dark mode. Everything seems to be functioning as expected on my side.

Screenshot (52) Screenshot (53)

abdel-lall
abdel-lall previously approved these changes Nov 16, 2025

@abdel-lall abdel-lall left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!
Screenshot 2025-11-16 011751

@Raghu04122002 Raghu04122002 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I ran this PR locally, signed in as an admin, and checked http://localhost:5173/bmdashboard/totalconstructionsummary . The interface loaded without issues, the hover tooltips on the bars and the “Reset Filter” button are functioning correctly. The chart displayed properly in both light and dark themes and the text is readable

https://www.loom.com/share/95148e4086544192a55379be1bc7c95b

@Prem203 Prem203 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the PR with an admin account. The tooltip now appears over the bar graph over every filter and dark mode. The UI seems consistent and the graph does not leak out of its border.

The only issue is in tablet resolution the graph is cut off from the screen and in mobile devices the graph data is overlapping and not clearly visible.

image image image image

@bhanuanishakkineni bhanuanishakkineni left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hello Aseem,
I have reviewed this PR though checking out to this branch and logging in as an admin.
From my testing, I observed that the filters like project, category, start date, end date are aligned and reset filters button are working fine.
The issues I observed are:
The container is rigid and is not responsive. For shorter screen sizes, the filter container and the plots container are not shrinking, rather they are rigid and are not visible.
For this issue, I think you should use responsive grid instead of fixed.
Apart from that, can you explain what are the dummy cards in grid. Instead of using those to fill empty columns, try to span the columns
If switched to dark only background of the plots is changing to dark, rest of the container is light. Also some text is not visible in dark mode.
Try reducing font size in mobile screen size, for better readability.
image
image
image
image

PR.4310.testing.mp4

@sonarqubecloud

Copy link
Copy Markdown

@Anusha-Gali Anusha-Gali left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi Aseem,

I have re-reviewed your PR locally and all the filters work as per requirement and the chart is visible in dark mode. Also the responsiveness i can see that you have updated the code for bigger screen size since that issue appears to be fixed but the issue still exists in the smaller screen size. Do let me know in case of any update.
Screenshot 2026-01-24 at 4 26 24 PM
Screenshot 2026-01-24 at 4 26 15 PM
Screenshot 2026-01-24 at 4 22 37 PM
Screenshot 2026-01-24 at 4 23 30 PM
Screenshot 2026-01-24 at 4 24 07 PM

@roshini1212 roshini1212 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi Aseem,

Found a critical issue: the chart displays "Failed to load data" error and doesn't render any graph data.

Image

@saitejakaasoju

Copy link
Copy Markdown
Contributor

Hi Aseem, while testing I came across an issue where the chart isn’t rendering and displays a “Failed to load financials” error.
PR-4310

@maithili20

Copy link
Copy Markdown
Contributor

Hi @aseemdeshmukh the feature works as expected in both dark and light mode. The layout remains stable when resizing the window, but a small portion of the page gets cut off.
Screenshot 2026-02-07 at 4 48 20 PM
Screenshot 2026-02-07 at 4 47 37 PM
Screenshot 2026-02-07 at 4 47 30 PM
Screenshot 2026-02-07 at 4 46 54 PM
Screenshot 2026-02-07 at 4 46 46 PM
Screenshot 2026-02-07 at 4 46 39 PM

@aseemdeshmukh

Copy link
Copy Markdown
Contributor Author

Fixed the mobile version as much as possible and Jae has approved the mobile version resolution not working perfectly and if gets cut a bit. Thank you!

@Anusha-Gali Anusha-Gali left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

hi Aseem,

Thanks for the update. Since the main feature of tooltips, reset filter do work , i am approving the PR.

Image Image

@HemanthNidamanuru HemanthNidamanuru left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi Aseem,

I reviewed the PR locally and verified that the tooltips are working properly, the text is readable, the reset filter button functions correctly.

Image Image Image Image

@rohanrastogi311 rohanrastogi311 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi Aseem,

The dark mode functionality needs improving. Check image below.

Image Image

const [endDate, setEndDate] = useState('');
const [data, setData] = useState([]);
const [errorMessage, setErrorMessage] = useState('');
const [windowWidth, setWindowWidth] = useState(window.innerWidth); // for responsiveness of labels

This comment was marked as resolved.

@ManojPuttaswamy ManojPuttaswamy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The bgColor, textColor, and gridColor variables are computed correctly but only on initial render, not when darkMode toggles

{/* <div className={styles.card}> */}
<div style={{ width: '100%', padding: '0.5rem' }}>
<div style={{ textAlign: 'center', marginBottom: '0.75rem' }}>
<h4 style={{ margin: 0, color: '#000000ff', fontSize: '1.4rem' }}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The color is hardcoded black even though darkMode and textColor are already computed and used elsewhere in the component.

@saisandeepkoritala saisandeepkoritala left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi Assem,

I ran your PR locally and filters are working as expected. The tooltips are working properly, the text is readable, the reset filter button functions correctly and when resized the UI didn't break. But the dark mode is causing styling issues for other components.

Image Image Image

@rajanidi1999 rajanidi1999 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi,
I have tested your PR locally and its running successfully as per instructions.

Image Image

@rithika-paii rithika-paii left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi Aseem,

I reviewed this PR by checking out the branch and testing the changes locally as an admin. The filter functionality works well — filters such as project, category, start date, end date, and the reset filters button are aligned and functioning as expected.

However, I observed a few issues:

Responsiveness issue: The filter container and plots container are rigid and do not adapt to smaller screen sizes. On smaller screens, they do not shrink and are partially invisible. It would be better to use a responsive grid instead of fixed sizing to handle different screen sizes.
Grid layout concern: Could you clarify the use of dummy cards in the grid? Instead of using placeholder elements to fill empty columns, consider using column spanning for a cleaner layout.
Dark mode issue: In dark mode, only the plot's background changes, while the rest of the container remains in light mode. Additionally, some text is not visible, which affects readability.
Mobile readability: The font size appears large on smaller screens. Reducing the font size for mobile view would improve readability.

These issues should be addressed to ensure proper responsiveness, consistent styling, and a better user experience before this PR can be approved.

Image Image

@kunchalasireesha kunchalasireesha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi Aseem, it looks like this PR currently has merge conflicts with the base branch. Could you please rebase or merge the latest changes from development into your branch and resolve the conflicts? Once the build passes, I’ll finish the review.

@saurabhdipte saurabhdipte left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi Aseem,

I tested the PR locally by navigating to and checked the Financials section. The tooltips on the graph bars are working correctly, the text is readable, and the Reset Filter button functions as expected. However, I noticed two issues, in dark mode, the graph background turns dark navy which makes the bars and text difficult to read against the background (screenshot attached). Additionally, the Y-axis label is missing from the graph.

Image Image

@DeepighaJ DeepighaJ left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi
Checkout to current branch and ran PR locally.
Logged in as Owner account.
Tooltip, Filters and Reset Filters are working as expected.
Dark mode does not displays properly.
Some text is not visible properly. Please refer below images.
Image
Image
Image
Image
Image

@sonarqubecloud

Copy link
Copy Markdown

@Jaden300 Jaden300 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Image Image Image Image Image Image

Tested the PR locally on the Planned vs Actual Cost Chart dashboard.

Dark mode styling appears to work correctly overall, and the updated chart text remains readable in both themes. Tooltip functionality on the visible financial chart bars is also working as expected.

However, some sections under the Financials dashboard do not load properly, including areas such as the Material Consumption view, which prevented full validation of tooltip behavior across all chart components.

Additionally, the “Reset Filter” button is not functioning correctly. Clicking it results in an “Error occurred” message instead of resetting the applied filters.

Overall, the primary chart UI updates are visible and partially functional, but there are still broken sections and filter reset issues that should be resolved before merge.

@amaresh2001 amaresh2001 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tested locally on branch: aseem-improve-filters-plannedvsactual-costchart

Tested:

  • Planned vs Actual Cost chart loads correctly
  • Hover tooltips show project name + planned/actual dollar values correctly
  • The Reset Filter button clears all filters back to the default
  • Project and Category dropdown filters update the chart correctly
  • Chart bars, labels, and legend are readable

Issue:
Dark mode not fully implemented: the filter controls (Project, Category, Start Date, End Date, Reset Filter button) and section cards remain white/light-colored, creating an inconsistent appearance against the dark page background.

Image Image Image

@YSWFelicity YSWFelicity left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Based on the instructions, light mode behaves mostly as expected. In dark mode, however, some other components render blank — this still needs improvement.
Image

Image

@Mahitha-pasupuleti Mahitha-pasupuleti left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hello Aseem,

Tested this PR locally and verified the tooltip and Reset Filter functionality in the Financials section. The new features work as expected, and the layout appears clean, readable, and responsive in light mode. However, in dark mode, the chart and surrounding UI elements do not render as cleanly and appear somewhat inconsistent and cluttered compared to the light mode experience. While the functionality itself is working correctly, some styling refinements in dark mode would improve the overall user experience.

Image Image

@Abhi-R0211 Abhi-R0211 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested locally on branch aseem-improve-filters-plannedvsactual-costchart, logged in as admin, navigated to /bmdashboard/totalconstructionsummary -> Financials. Here is my analysis:

What's Working Well

  • Light mode renders correctly — all three projects display with readable bars, labels, and y-axis values
Image
  • Tooltip on hover works as expected in light mode on desktop: shows project name, Planned, and Actual values with proper currency formatting (e.g. Project: Project B / Planned: $3,300 / Actual: $3,200)
Image
  • Project filter correctly narrows the chart to the selected project
Image
  • Category filter works correctly in combination with the project filter — Project A + Electrical shows Planned $1,500 / Actual $1,300
Image
  • Reset Filter clears all applied filters and restores the default chart view

Issues

  1. Dark mode — incomplete theming on filter controls and card container
    In dark mode, only the chart plot area adopts a dark background. The filter controls (Project dropdown, Category dropdown, Start Date, End Date, Reset Filter button) and the surrounding card container remain white/light-colored, creating a visually inconsistent appearance against the dark page background. This has been flagged by prior reviewers and remains unresolved.
Image
  1. Mobile (375px) — chart not scrollable, bars unreadable, tooltip non-functional
    At 375px width the chart is not scrollable, bars are extremely narrow and cramped, x-axis labels are cut off, and the tooltip does not function.
Image
  1. Tablet (768px) — chart not scrollable, filter row overflows
    At tablet width the chart is also not scrollable. The filter row overflows its container, with the End Date field and Reset Filter button clipped off the right edge of the card.
Image

@AmaanSyed09 AmaanSyed09 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verified:

  1. Tooltip functionality is working correctly and displays project names with formatted planned and actual cost values.

  2. Project and Category filters are functioning and update the chart based on the selected values.

  3. The Reset Filter button correctly restores the default filter state.

  4. Text, labels, and chart elements are readable in light mode.

Additional Observations:

  1. Some Project + Category combinations return no results (for example, Project B + Electrical, Project B + Mechanical, etc.), while valid combinations display data correctly. During testing, data appeared only for:
    Project A → Plumbing, Electrical
    Project B → Plumbing, Structural
    Project C → Electrical, Mechanical

  2. When no data matches the selected filters, the chart area becomes blank without any message indicating that no data is available for the selected criteria.

  3. The date filters do not appear to work as expected. Changing the Start Date and End Date frequently results in the chart becoming empty, and I was unable to identify date ranges that produced different filtered results. It is unclear whether the selected dates are actually being applied to the dataset or if the available test data falls outside the selected ranges.

Issues Found:

  1. Dark mode compatibility does not appear to be working correctly. In dark mode, all the section renders with a mostly white layout and poor text visibility, making it inconsistent with the rest of the dashboard and difficult to read.

  2. Responsive behavior needs improvement on smaller screen sizes. During mobile viewport testing, portions of the chart and content were cut off horizontally, reducing readability and usability.

Screenshots attached:

Image Image Image Image Image Image Image Image

@Dnagabahiru Dnagabahiru left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tested the PR locally and verified the Financials section at /bmdashboard/totalconstructionsummary. Tooltips for the graph bars are working correctly, the text is readable in light mode, and the Reset Filter button functions as expected. The only issue identified is in dark mode, where the font/text is not visible due to a contrast or styling problem. Aside from the dark mode text visibility issue, the feature is working as expected.

Image Image Image Image Image Image

@aseemdeshmukh

Copy link
Copy Markdown
Contributor Author

Created a new PR and closing the current PR : #5369

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.