Skip to content

Comments

2120 link data to simulations same color#2617

Merged
rwmcintosh merged 17 commits intodevelopfrom
2120-link-data-to-simulations-same-color
Oct 22, 2025
Merged

2120 link data to simulations same color#2617
rwmcintosh merged 17 commits intodevelopfrom
2120-link-data-to-simulations-same-color

Conversation

@benjaperez1983
Copy link
Contributor

Fixes #2120

Description

Link data to simulation, keep the same color for the added curves

Type of change

Please mark relevant options with an x in the brackets.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires documentation changes (link at least one user or developer documentation issue):
  • Algorithm update - updates algorithm documentation/questions/answers etc.
  • Other (please describe):

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Integration tests
  • Unit tests
  • Manual tests
  • No tests required

Reviewer checklist

Mark everything that needs to be checked before merging the PR.

  • Check if the code is well documented
  • Check if the behavior is what is expected
  • Check if the code is well tested
  • Check if the code is readable and well formatted
  • Additional checks (document below if any)
  • Check if documentation update issue(s) are created if the option This change requires a documentation update above is selected

Screenshots (if appropriate):

Questions (if appropriate):

@rwmcintosh
Copy link
Member

Should we move this to v13, or wait for v12.2?

Copy link
Member

@msevestre msevestre left a comment

Choose a reason for hiding this comment

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

I had left many comments to this code on the other PR. Can you please review
@benjaperez1983 @rwmcintosh ?

@Yuri05
Copy link
Member

Yuri05 commented Aug 29, 2025

Should we move this to v13, or wait for v12.2?

I would say: yes, V13 or V12.2 whatsoever, but not V12.1
There are potential side effects which require more testing (e.g. it seems to me that this new feature in combination with the stacked chart update might result in color change of previously added curves?)

@benjaperez1983
Copy link
Contributor Author

I had left many comments to this code on the other PR. Can you please review @benjaperez1983 @rwmcintosh ?

Can you let me know please what PR was that?

@PavelBal
Copy link
Member

PavelBal commented Sep 2, 2025

I assume this one #2602

@Yuri05 Yuri05 marked this pull request as draft September 9, 2025 10:22
@Yuri05
Copy link
Member

Yuri05 commented Sep 9, 2025

@benjaperez1983 Just converted to draft to prevent unintentional merging before 12.1 is released.

@benjaperez1983 benjaperez1983 marked this pull request as ready for review September 10, 2025 12:02
@benjaperez1983
Copy link
Contributor Author

@msevestre Could you re-review please ?

Thanks!

Copy link
Member

@msevestre msevestre left a comment

Choose a reason for hiding this comment

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

see review

Copy link
Member

@msevestre msevestre left a comment

Choose a reason for hiding this comment

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

Just a few minor suggestions. Approved

@Yuri05 Yuri05 requested a review from Copilot October 21, 2025 15:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements functionality to maintain consistent curve colors when linking observed data to simulation outputs. When data columns are linked to simulations (e.g., mapping observed data to simulation curves), the added curves now preserve the same color as their corresponding simulation curves based on matching bottom compartments.

Key Changes:

  • Extended UsedColumnsEventArgs to include an IsLinkedDataToSimulation flag to distinguish between regular data additions and simulation-linked data
  • Added BottomCompartment property to DataColumn to enable compartment-based color matching
  • Modified curve color assignment logic to match colors by compartment when linking data to simulations

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
UsedColumnsEventArgs.cs Added IsLinkedDataToSimulation parameter to track when data is being linked to simulations
DataColumnDTO.cs Set BottomCompartment on the underlying DataColumn during DTO initialization
DataBrowserPresenter.cs Propagated isLinkedDataToSimulations flag through the data selection pipeline
ChartEditorPresenter.cs Updated curve creation to pass the linked data flag and reordered color/style update logic
CurveChartExtensions.cs Implemented compartment-based color matching for linked simulation data
DataColumn.cs Added BottomCompartment property to store compartment information
ChartEditorPresenterSpecs.cs Added test coverage for linked data color matching and updated existing test signatures

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@rwmcintosh rwmcintosh merged commit 96de73e into develop Oct 22, 2025
5 checks passed
@rwmcintosh rwmcintosh deleted the 2120-link-data-to-simulations-same-color branch October 22, 2025 19:55
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.

"Link Data to simulations" in chart editor - apply same color to all data/simulation results

5 participants