MudChart: Support custom ToString func for Y axis#11674
MudChart: Support custom ToString func for Y axis#11674ScarletKuro merged 14 commits intoMudBlazor:devfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #11674 +/- ##
==========================================
- Coverage 91.35% 91.33% -0.02%
==========================================
Files 466 468 +2
Lines 14697 14766 +69
Branches 2853 2874 +21
==========================================
+ Hits 13426 13487 +61
- Misses 632 636 +4
- Partials 639 643 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
While I could agree with the axis value being culture sensitive, I don't believe changing the ToS method to utilize culture is valid. It's used in multiple places, some of which may error if a comma is used for decimal values. |
Agreed. I will improve the implementation. Thank you for the feedback. |
…y adding YAxisToStringFunc parameter
|
|
Can anybody please help me? The code analysis is pointing a code duplication but I don't think it is right. |
danielchalmers
left a comment
There was a problem hiding this comment.
Not sure why the quality bot still doesn't like it, but I fixed the indent and build errors in your branch. If you could add tests for YAxisToStringFunc we should be good to merge 👍





Fixes #11673
Description
This PR adds support for formatting the Y axis values in MudChart using a custom ToString parameter.
Before:

With es-AR culture and 'tCO2e':

Tested locally in MudBlazor.Docs.Server