I249- Fix AreaSeries Y-Axis Rendering Issue in .NET MAUI Chart. #253
+0
−10
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.
Bug Description
When the item source is changed dynamically for multiple area series, the Y-axis range does not update correctly. It continues to use the previous range instead of adjusting to the new minimum Y values.
Issue
Root Cause
In the SetData method, the series range is updated using the minimum and maximum values. If the new minimum value is zero, the code mistakenly uses the previous visible range's start value. This happens when the item source is changed dynamically and contains zero as the minimum value. This issue occurs specifically with multiple area series.ries.
Reason for the bug (maybe some wrong condition or wrong code)
The logic did not correctly handle the case when the minimum value is zero. It reused the previous axis range instead of recalculating it.
Why it fails because of the above reason?
Reason for not identifying earlier
This test case was missed in previous testing.
Action taken:
Related areas:
Is Breaking issue?
No, this is not a breaking issue. The chart still renders, but the Y-axis range may be incorrect, affecting data visualization.
Solution description
Output Demo
Before changes
**After changes: **
Areas affected and ensured
New Test cases
Is automated against existing test cases and ensured zero breaking
Add Centralized automation link
Does it have any known issues?
No known issues with this fix.
Does it have memory leak?
No memory leaks observed.
Does it affect the existing CPU usage for the live demo?
No significant impact on CPU usage.
Does it affect existing memory for the performance sample?
No significant impact on memory usage.
MR CheckList