Skip to content

Ganesh implements a loss tracking line graph#3876

Closed
karnati007 wants to merge 9 commits intodevelopmentfrom
Ganesh_impl_loss_tracking_line_graph
Closed

Ganesh implements a loss tracking line graph#3876
karnati007 wants to merge 9 commits intodevelopmentfrom
Ganesh_impl_loss_tracking_line_graph

Conversation

@karnati007
Copy link
Copy Markdown

Description

image

Related PRS (if any):

Main changes explained:

  • Created LossTrackingLineChart.jsx file to implement line chart of loss tracking using recharts library.
  • Created LossTrackingLineChart.css file to define the styles for the filters and chart for both light and dark themes.
  • Updated WeeklyProjectSummary.jsx file to import line chart into financials sections.

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 admin user
  5. go to dashboard→ Reports→ Total Construction Summary→ Financials (Loss Tracking Line Chart).
  6. verify the filters and dark mode.

Screenshots or videos of change

Light Theme:
https://github.com/user-attachments/assets/20fc4c25-78b7-4f93-add5-b4274486596e

Dark Theme:
image

@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 9, 2025

Deploy Preview for highestgoodnetwork-dev ready!

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

@nikitha2n
Copy link
Copy Markdown

I navigated to Dashboard → Reports → Total Construction Summary → Financials (Loss Tracking Line Chart). Verified that all filters work correctly and the dark mode displays properly without issues. Everything looks good!

PR_3876.mp4

@karnati007 karnati007 closed this Aug 9, 2025
@karnati007 karnati007 reopened this Aug 9, 2025
@karnati007 karnati007 added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Aug 9, 2025
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.

Wow this looks great, and better then before, I have a few observations

  1. in dark mode the graph x-axis and yaxis and datapoints is black, which isnt seen clearly, if there is any way to change that
Screenshot from 2025-08-09 19-52-03 2. in light mode the reset filter button is not seen Screenshot from 2025-08-09 19-53-19 3. from and to? what kind of datapoints were expected from user? Screenshot from 2025-08-09 19-55-06

Copy link
Copy Markdown
Contributor

@sohailuddinsyed sohailuddinsyed left a comment

Choose a reason for hiding this comment

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

The filter look great in light mode, however, in dark mode the color of values on x and y-axis can be changed to a lighter one for better visibility.
Screenshot 2025-08-09 222749
Screenshot 2025-08-09 222740

@aseemdeshmukh
Copy link
Copy Markdown
Contributor

aseemdeshmukh commented Aug 10, 2025

Navigated to to dashboard→ Reports→ Total Construction Summary→ Financials (Loss Tracking Line Chart); reviewed for both light and dark mode.

Observations:

  1. For Light mode, "Reset Filters" button text is not clearly visible under Loss Tracking Line Chart
  2. For Dark mode, "Planned vs Actual Cost" text is not clearly readable
  3. There should be "Reset Filters" button for "Planned vs Actual Cost" like the existing button under "Loss Tracking Line Chart"
    PR3876_1
    PR3876_2
    PR3876_3

Copy link
Copy Markdown

@Naveen-Kumar-Reddy-27 Naveen-Kumar-Reddy-27 left a comment

Choose a reason for hiding this comment

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

Tested PR #3876 locally against development. Verified UI and identified the following issues:
Dark Mode Text Visibility
Low contrast makes text under "Planned vs Actual Cost" (e.g., date fields, project filters) hard to read.
PR 3876 dark mode

Light Mode Button Contrast
The button under "Loss Tracking Line Chart" blends into the light background.
Missing "Reset Filters" Button
"Planned vs Actual Cost" lacks a "Reset Filters" button, unlike the Loss Tracking section.
PR 3876 light mode

Padding/Alignment Issues
Adding some space or padding between the X-axis label "Time (months)" and the year legends (2022, 2023, 2024) would improve readability and overall look.

PR 3876 padding issue

@Yi9569
Copy link
Copy Markdown

Yi9569 commented Aug 13, 2025

Approving

Light mode and dark mode both are working as expected.

Screenshot 2025-08-13 at 7 50 43 PM Screenshot 2025-08-13 at 7 50 59 PM

@JERRRRY
Copy link
Copy Markdown

JERRRRY commented Aug 15, 2025

In dark mode, i suggested that the color of start date and end date could be lighter.
Screenshot 2025-08-14 at 8 00 36 PM

Copy link
Copy Markdown

@Guirong-Wu Guirong-Wu left a comment

Choose a reason for hiding this comment

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

PR reviewed. The input box sizes of the date and selection fliters are different and the reset button is not aligned with the date selection box, hope this could be fixed.
And if there could be a pop-out reminder saying the the start date should be earlier than the end date could be much better.
Screenshot 2025-08-15 at 23 40 57
Screenshot 2025-08-15 at 23 41 35

@surajmaraboina
Copy link
Copy Markdown

I navigated to Loss Tracking Line Chart. All filters work correctly and the dark mode displays properly without issues. Everything looks great.(3876)
Screenshot (1314)
Screenshot (1315)

Copy link
Copy Markdown

@SallaguntaRaahul SallaguntaRaahul 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-3876.

In light mode, the Reset Filters button is not clearly visible and should have higher contrast.
Screenshot 2025-08-16 at 10 21 50 AM
For each material, only one year of data is currently being returned. This means a material shows data tied to a single year, but ideally each material should support data and tracking across multiple years, not just one.

Also, I noticed stray “📊 Card” and “📊 Big Card” labels at the bottom of the dashboard that look like leftover demo components—these should be removed to avoid UI clutter.

On the line chart, the x-axis label (“Time (months) – 2022”) overlaps with the tick values, which makes it hard to read. This should be repositioned or styled differently

Screenshot 2025-08-16 at 10 21 22 AM

In dark mode, the same issues persist (year–material restriction, x-axis label overlap, stray demo labels), and in addition the text labels in the Planned vs Actual Cost chart are rendered in dark colors, which makes them nearly invisible against the dark background.
Screenshot 2025-08-16 at 10 31 20 AM

@Swetha-1306
Copy link
Copy Markdown

Tested the PR, All the filter drop downs work well in retrieving the respective data for the selected filters and date range. There are minor issues like text visibility in "Reset All" button in light mode. Apart from that everything else looks fine.
Screenshot 2025-08-16 at 1 33 50 PM
Screenshot 2025-08-16 at 1 41 32 PM

Copy link
Copy Markdown
Contributor

@sourabhbagde sourabhbagde left a comment

Choose a reason for hiding this comment

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

Tested the feature and it works well overall. Few styling improvements recommended:

Improve typography hierarchy (clearer headers, smaller axis/legend text).
Reset filter button (not properly readable text color)
Screenshot 2025-08-23 at 12 18 37 PM

On hovering graph - Month text is not readable as same with background color black.
Screenshot 2025-08-23 at 12 16 48 PM

Copy link
Copy Markdown
Contributor

@aseemdeshmukh aseemdeshmukh left a comment

Choose a reason for hiding this comment

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

Navigated to to dashboard→ Reports→ Total Construction Summary→ Financials (Loss Tracking Line Chart); reviewed for both light and dark mode.

Observations:

  • For Light mode, "Reset Filters" button text is not clearly visible under Loss Tracking Line Chart
  • For Dark mode, "Planned vs Actual Cost" text is not clearly readable
  • There should be "Reset Filters" button for "Planned vs Actual Cost" like the existing button under "Loss Tracking Line Chart"

Copy link
Copy Markdown

@srushti2403 srushti2403 left a comment

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 the filters and ligh/dark mode work properly. Though, I have a couple of observations.
In light mode, the Reset Filters button text is not very visible.
Screenshot 2025-08-24 at 2 05 25 PM
In dark mode, everything looks good, except the datapoints on x-axis and y-axis in bar graph. Not visible in dark mode.
Screenshot 2025-08-24 at 2 05 57 PM

vishnu-ing
vishnu-ing previously approved these changes Aug 26, 2025
Copy link
Copy Markdown
Contributor

@vishnu-ing vishnu-ing left a comment

Choose a reason for hiding this comment

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

The PR has been reviewed for code changes and the functionality is working good which has been tested in local. As per the suggestions in previous comments in PR, there can be some changes in text color in dark and light modes to make the UI better. No new review ccomments, Everything has been covered in previous comments. Attaching screenshots for current UI with graph data and filters applied in different modes.

image image

akshith312
akshith312 previously approved these changes Sep 5, 2025
Copy link
Copy Markdown
Contributor

@akshith312 akshith312 left a comment

Choose a reason for hiding this comment

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

Tested locally. All the filters and buttons seem to work properly.
Just the improvements mentioned in other PR's regarding UI enhancements would make it visually better appealing.

image image

Copy link
Copy Markdown
Contributor

@SreePujitha01 SreePujitha01 left a comment

Choose a reason for hiding this comment

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

Tested the Reports → Total Construction Summary → Financials (Loss Tracking Line Chart) section. The filters work correctly and dark mode is functional. However, the chart styling could be improved—using different colors would help make the data more visible and clear.

image image

Copy link
Copy Markdown

@khan-zoha khan-zoha left a comment

Choose a reason for hiding this comment

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

Reviewed PR 3876. The light and dark mode works as expected. Great work!

Screenshot 2025-09-13 at 6 06 58 PM Screenshot 2025-09-13 at 6 06 44 PM

Copy link
Copy Markdown
Contributor

@RitzzzZ2021 RitzzzZ2021 left a comment

Choose a reason for hiding this comment

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

I navigated to Dashboard → Reports → Total Construction Summary → Financials (Loss Tracking Line Chart) as required. When I applied filters for different materials, it instead filtered by year. There are also no tags available for materials. Additionally, the chart design could be improved to make it clearer for readers.

image

Copy link
Copy Markdown

@Nhujarski Nhujarski left a comment

Choose a reason for hiding this comment

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

I tested the PR using the above steps. Filters work as expected and looks good in dark mode. One suggestion I had for light mode was either the font color or background color of the "Reset Filters" button be changed for readability.
Screenshot 2025-09-26 at 12 01 17 PM

Screenshot 2025-09-26 at 12 01 25 PM Screenshot 2025-09-26 at 12 01 35 PM Screenshot 2025-09-26 at 12 02 24 PM

Copy link
Copy Markdown
Contributor

@aryanrachala54 aryanrachala54 left a comment

Choose a reason for hiding this comment

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

The core functionality looks good, and filters are mostly working as expected. Before merging, a few key issues still need to be addressed:

  • Improve text contrast for better readability in both light and dark modes (e.g., axis labels, "Reset Filters" button).
  • Fix material filter logic (currently filters by year).
  • Add "Reset Filters" button to the "Planned vs Actual Cost" section.
  • Remove stray “📊 Card” components.
  • Add validation to ensure start date is before end date.
Screenshot 2025-09-28 004331 Screenshot 2025-09-28 004412

Copy link
Copy Markdown

@rohanrastogi311 rohanrastogi311 left a comment

Choose a reason for hiding this comment

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

Hi Ganesh,

I'm having a launch error due to a missing module. Please review and let me know to re-review.

PR 3876 Screenshot

Copy link
Copy Markdown

@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 Ganesh,

I have reviewed your PR locally and it works as per requirement.

Image Image Image Image

saitejakaasoju added a commit that referenced this pull request Mar 18, 2026
Fixes from PR #3876 review + code improvements:

1. Critical bug fix: mergedData key was `line.year` (number) but <Line
   dataKey> expected `${line.year}-${line.material}` — multiple materials
   of the same year were silently overwriting each other in the chart data.

2. Wrap mergedData/chartData computation in useMemo (deps: filteredLines,
   startDate, endDate) to avoid unnecessary recalculation on every render.

3. Expanded color palette to support 9 year-material combinations:
   Teal shades for 2022, Pink shades for 2023, Yellow/Orange for 2024.

4. Expanded mock rawData to include all 3 materials (Metal, Plastic, Glass)
   for each of the 3 years (2022-2024), giving 9 distinct lines.

5. Moved date-range validation error message out of the <label> element
   and added .dateRangeError CSS class (grid-column: 1 / -1 for full width).

6. Applied Prettier formatting (auto-fixed via eslint --fix).

All dark mode axis/tick colors already handled via dynamic textColor;
Reset Filters button visibility handled via CSS module variables.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@one-community
Copy link
Copy Markdown
Member

Redone with this PR: #5016

1 similar comment
@one-community
Copy link
Copy Markdown
Member

Redone with this PR: #5016

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.