Browse Source
Task/localize number formatting of y-axis labels in line chart component (#5624)
* Localize number formatting of y-axis labels in line chart component
* Update changelog
pull/5633/head^2
David Requeno
3 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
5 additions and
1 deletions
-
CHANGELOG.md
-
libs/ui/src/lib/line-chart/line-chart.component.ts
|
@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
|
### Changed |
|
|
### Changed |
|
|
|
|
|
|
|
|
|
|
|
- Localized the number formatting of the y-axis labels in the line chart component |
|
|
- Improved the wording of the 4% rule in the _FIRE_ section |
|
|
- Improved the wording of the 4% rule in the _FIRE_ section |
|
|
- Improved the language localization for German (`de`) |
|
|
- Improved the language localization for German (`de`) |
|
|
|
|
|
|
|
|
|
@ -261,7 +261,10 @@ export class GfLineChartComponent |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (typeof tickValue === 'number') { |
|
|
if (typeof tickValue === 'number') { |
|
|
return tickValue.toFixed(2); |
|
|
return tickValue.toLocaleString(this.locale, { |
|
|
|
|
|
maximumFractionDigits: 2, |
|
|
|
|
|
minimumFractionDigits: 2 |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return tickValue; |
|
|
return tickValue; |
|
|