Skip to content

Conversation

rita-gwen
Copy link
Contributor

This PR implements following changes go the Relative Abundance graph:

  • make sure there is always a little white space between the first (leftmost) point marker in the graph and the Y axis
  • avoid resetting the graph zoom due to selection change or other changes that do not modify the document
  • decouple Log Scale setting for the Relative Abundance graph from other peak area graphs and set its default to true

These are based on Mike's suggestions in the e-mail thread from Jul 29.

!Equals(_graphData.AggregateOp, aggregateOp))
{
_graphData = CreateGraphData(document, graphSettings);
dataChanged = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

"dataChanged" is used to decide whether to reset the graph by calling "UpdateAxes".
I wonder if we could do something smarter than just looking at whether the Document is different.
Maybe we could compare the new graph data to the old graph data and only update the axes if there are more points or the maximum Y value of all of the points has changed.

As it stands, the graph will reset itself when the document changes for reasons that do not affect the layout, such as editing the Note on something in the Targets tree or when the document changes because of a background loader.

@rita-gwen rita-gwen merged commit 775b27f into master Sep 13, 2024
12 checks passed
@rita-gwen rita-gwen deleted the Skyline/work/20240820_RelativeAbundancePlotFixes branch March 24, 2025 18:09
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.

2 participants