MudTimeSeriesChart: Use InvariantCulture when rendering opacity (#11696)#11697
Merged
ScarletKuro merged 1 commit intoMudBlazor:devfrom Jul 23, 2025
Merged
Conversation
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
Fixes opacity rendering issues in MudTimeSeriesChart where decimal values for FillOpacity and StrokeOpacity were not being correctly applied in certain environments due to culture-specific decimal formatting.
- Updates opacity value rendering to use InvariantCulture formatting
- Ensures consistent decimal formatting across different localization environments
Comment on lines
+65
to
+70
| <path class="@lineClass" @onclick="() => SelectedIndex = chartLine.Index" fill="none" stroke="@color" stroke-opacity="@series.StrokeOpacity.ToString(CultureInfo.InvariantCulture)" stroke-width="@MudChartParent?.ChartOptions.LineStrokeWidth" d="@chartLine.Data"></path> | ||
|
|
||
| if (series.LineDisplayType == LineDisplayType.Area) | ||
| { | ||
| var chartArea = _chartAreas[chartLine.Index]; | ||
| <path class="@lineClass" @onclick="() => SelectedIndex = chartLine.Index" fill="@color" fill-opacity="@series.FillOpacity" d="@chartArea.Data"></path> | ||
| <path class="@lineClass" @onclick="() => SelectedIndex = chartLine.Index" fill="@color" fill-opacity="@series.FillOpacity.ToString(CultureInfo.InvariantCulture)" d="@chartArea.Data"></path> |
There was a problem hiding this comment.
[nitpick] Consider extracting the opacity formatting logic into a helper method or property to avoid code duplication. Both StrokeOpacity and FillOpacity use the same ToString(CultureInfo.InvariantCulture) pattern.
ScarletKuro
approved these changes
Jul 23, 2025
This was referenced Aug 5, 2025
Closed
Closed
This was referenced Aug 14, 2025
This was referenced Oct 6, 2025
This was referenced Nov 12, 2025
This was referenced Dec 12, 2025
Closed
Closed
This was referenced Dec 29, 2025
This was referenced Jan 9, 2026
Closed
This was referenced Feb 10, 2026
Closed
This was referenced Feb 23, 2026
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.



Fixes #11696
When rendering a MudTimeSeriesChart with FillOpacity on TimeSeriesChartSeries set to a decimal value, the opacity is not applied correctly in some environments.
All decimal values must be formatted using the Invariant Culture.
Checklist:
dev).