Added Support for Multiple Intensity Axis Titles in MS/MS Spectrum View#551
Merged
Added Support for Multiple Intensity Axis Titles in MS/MS Spectrum View#551
Conversation
- Added a transparent rectangle to the chart area to ensure interactivity and visual consistency. - Increased the `radius` constant from 3d to 4d, likely affecting visual element size or sensitivity. - Refactored `FocusedItem` and `FocusedPoint` logic for better clarity and proper null handling.
Introduce the AxisTitles class in the CompMs.Graphics.Base namespace, providing a bindable representation of axis titles with change notification support. Add the AxisTitlesTypeConverter class to enable custom type conversion for AxisTitles, supporting conversions from string and IEnumerable<string> to AxisTitles, and vice versa. Include necessary using directives for required namespaces.
Updated the CompareTo, Equals, ToString, GetHashCode, and IsNaN methods in the AxisValue class to be readonly. This ensures these methods do not modify the object's state, reinforcing immutability and improving code clarity.
Enhanced `MultiChart` and `SimpleChartControl` with new private boolean fields to manage state during property changes and prevent recursive updates. Updated `HorizontalTitle` and `VerticalTitle` dependency properties with change callbacks for synchronization. Introduced `HorizontalTitles` and `VerticalTitles` dependency properties to support `AxisTitles` objects for complex title management. Implemented bidirectional synchronization between single and multiple title properties. Updated constructors to initialize `RenderAreaControlStateProperty` with a new instance.
Updated `AxisItemModel` properties to be nullable, added null-checks and fallback values to prevent runtime errors, and enhanced `AxisItemSelector` with new methods. Introduced `VerticalTitles` property, marking `VerticalTitle` as obsolete. Improved error handling, reactive property updates, and code consistency. Updated view models and methods to align with these changes.
Updated MsSpectrumView.xaml and ChartStyles.xaml to enable dynamic support for multiple vertical axis titles using an ItemsControl with a UniformGrid layout. Adjusted bindings in RawPurifiedView.xaml to reflect the new multi-title structure and improved axis title styling.
Introduce a new "Absolute" axis type in ObservableMsSpectrum.cs, created using ToReactiveContinuousAxisManager with a ConstantMargin of (0, 30) and initial values of 0d for min/max. Add it to AxisItemSelector as an AxisItemModel with a label and description. Ensure proper disposal by adding to the Disposables collection.
Bujee415
approved these changes
Apr 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Classification
New feature, code cleanup, and null safety improvements.
PR Summary
This PR introduces support for multiple axis titles, enhances null safety, and refactors axis-related logic for better performance and usability.
AxisTitles.cs: AddedAxisTitlesclass andAxisTitlesTypeConverterto support multiple axis titles.MsSpectrumModel.cs: IntroducedVerticalTitlesproperty, markedVerticalTitleas obsolete, and improved nullability handling.ItemsControlfor multiple titles.SingleSpectrumViewModeland refactored peak detection logic in spectrum models.