Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jai/TLI 101.e -- Added ability to upload multiple model and fixed graphs #88

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

Jai0212
Copy link
Owner

@Jai0212 Jai0212 commented Nov 22, 2024

Pull Request Description

Feature Implementation:

This PR enables the functionality for uploading multiple models to Dashboard 2. The system has been updated to handle file validation, properly store uploaded models, and display corresponding data and graphs for each model. The following changes have been made:

  • Multiple Model Upload: Users can now upload multiple models at once instead of uploading one at a time.

  • File Validation: The system checks the file types of uploaded models and ensures only valid model files are accepted. Invalid files trigger an error message.

  • Error Handling: Several error scenarios have been accounted for:

    • Invalid File Types: Non-model files are rejected, and a helpful error message is displayed.
    • Duplicate Model Names: Users are notified if they attempt to upload a model with a name that already exists.
  • Dashboard 2 Output: The dashboard now correctly generates data and graphs for each uploaded model. Each model's respective data is shown, and graphs are plotted accordingly.

  • Local Storage: Uploaded models are stored in local storage and are retrievable without any issues, ensuring persistence between sessions.

  • Graph Enhancements:

    • Axes Labels: Both dashboards now have properly labeled axes on the graphs to improve clarity and data interpretation.
    • Hover Tooltip: A tooltip now appears when hovering over any graph, displaying detailed data for the hovered point.

Acceptance Criteria:

  • Multiple Model Upload: Users can upload multiple models simultaneously in Dashboard 2.
  • Error Handling:
    • Invalid file types (non-model files) are rejected with an error message.
    • Duplicate model names trigger a notification, preventing overwriting.
  • Dashboard 2 Output: The dashboard correctly processes and displays the data and graphs for all uploaded models.
  • Local Storage: Uploaded models are correctly stored and retrieved from local storage.
  • Hover Tooltip: Detailed data is displayed when hovering over the graph points.
  • Axes: Axes on graphs are labeled for better data interpretation on both dashboards.

Testing:

  • Test uploading multiple models with valid and invalid file types.
  • Test the handling of duplicate model names.
  • Verify that data and graphs are displayed correctly for each model in the dashboard.
  • Ensure that models are stored in local storage and persist after refresh.
  • Test the tooltip on graph hover and verify that it displays the correct data.
  • Confirm that the axes of the graphs are labeled properly.
image

Copy link

netlify bot commented Nov 22, 2024

Deploy Preview for cash-app-bias-busters ready!

Name Link
🔨 Latest commit c502d0e
🔍 Latest deploy log https://app.netlify.com/sites/cash-app-bias-busters/deploys/674028950c7bdd000859dc58
😎 Deploy Preview https://deploy-preview-88--cash-app-bias-busters.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 site configuration.

},
y: {
min: 0,
max: 1,
beginAtZero: true, // Ensure y-axis starts at zero
title: {
display: true, // Show the title
Copy link
Collaborator

Choose a reason for hiding this comment

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

looks good! can we do this for chart component1 as well?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yup, I already did that!

Copy link
Collaborator

Choose a reason for hiding this comment

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

great thank you!

"#99CC99", // Darker bright green 4
"#99FF99", // Bright green 5 (unchanged)
"#FF5733", // Vibrant Red
"#33FF57", // Vibrant Green
Copy link
Collaborator

Choose a reason for hiding this comment

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

these colors need to change (I assume the CSS will handle that?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yea, this is just placeholder, we need to revamp the entire theme and layout of this page

@@ -188,7 +186,7 @@ const Dashboard2 = () => {

<div className="chart-section">
{Object.keys(graphData).length > 0 && (
<ChartComponent2 chartData={graphData} />
<ChartComponent2 chartData={graphData} generationalResults={generationResults} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you explain what generationalResults const do?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Its a variable for storing the tooltip hover data for each bar of the graph

Copy link
Collaborator

@armaganngul armaganngul left a comment

Choose a reason for hiding this comment

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

Small comments

@armaganngul
Copy link
Collaborator

Looks good Jai thanks! Go through my comments but other than that works fine

@armaganngul armaganngul merged commit ba8c977 into main Nov 22, 2024
5 checks passed
@Jai0212 Jai0212 added enhancement New feature or request Frontend labels Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TLI 101.e -- Allow user to upload multiple models at once in Dashboard 2 and fix graph
2 participants