Browse Source
Bugfix/fix empty state of proportion chart (#976)
* Fix empty state (chart with two levels)
* Update changelog
pull/977/head
Thomas Kaul
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
10 additions and
0 deletions
-
CHANGELOG.md
-
libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts
|
|
@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
- Exposed the environment variable `REDIS_PASSWORD` |
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
- Fixed the empty state of the portfolio proportion chart component (with 2 levels) |
|
|
|
|
|
|
|
### Todo |
|
|
|
|
|
|
|
- Apply data migration (`yarn database:migrate`) |
|
|
|
|
|
@ -248,6 +248,12 @@ export class PortfolioProportionChartComponent |
|
|
|
datasets[0].data[0] = Number.MAX_SAFE_INTEGER; |
|
|
|
} |
|
|
|
|
|
|
|
if (datasets[1]?.data?.length === 0 || datasets[1]?.data?.[1] === 0) { |
|
|
|
labels = ['']; |
|
|
|
datasets[1].backgroundColor = [this.colorMap[UNKNOWN_KEY]]; |
|
|
|
datasets[1].data[1] = Number.MAX_SAFE_INTEGER; |
|
|
|
} |
|
|
|
|
|
|
|
const data: ChartConfiguration['data'] = { |
|
|
|
datasets, |
|
|
|
labels |
|
|
|