Bugfix/fix empty state of proportion chart (#976)
* Fix empty state (chart with two levels) * Update changelog
This commit is contained in:
parent
f1e06347d3
commit
b9c9443899
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user