|
|
@ -140,16 +140,18 @@ export class GfPortfolioProportionChartComponent |
|
|
|
|
|
|
|
|
if ( |
|
|
if ( |
|
|
chartData[this.data[symbol][this.keys[0]].toUpperCase()] |
|
|
chartData[this.data[symbol][this.keys[0]].toUpperCase()] |
|
|
.subCategory[this.data[symbol][this.keys[1]]] |
|
|
?.subCategory?.[this.data[symbol][this.keys[1]]] |
|
|
) { |
|
|
) { |
|
|
|
|
|
// @ts-ignore
|
|
|
chartData[ |
|
|
chartData[ |
|
|
this.data[symbol][this.keys[0]].toUpperCase() |
|
|
this.data[symbol][this.keys[0]].toUpperCase() |
|
|
].subCategory[this.data[symbol][this.keys[1]]].value = chartData[ |
|
|
].subCategory[this.data[symbol][this.keys[1]]].value = chartData[ |
|
|
this.data[symbol][this.keys[0]].toUpperCase() |
|
|
this.data[symbol][this.keys[0]].toUpperCase() |
|
|
].subCategory[this.data[symbol][this.keys[1]]].value.plus( |
|
|
].subCategory?.[this.data[symbol][this.keys[1]]].value.plus( |
|
|
this.data[symbol].value || 0 |
|
|
this.data[symbol].value || 0 |
|
|
); |
|
|
); |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
// @ts-ignore
|
|
|
chartData[ |
|
|
chartData[ |
|
|
this.data[symbol][this.keys[0]].toUpperCase() |
|
|
this.data[symbol][this.keys[0]].toUpperCase() |
|
|
].subCategory[this.data[symbol][this.keys[1]] ?? UNKNOWN_KEY] = { |
|
|
].subCategory[this.data[symbol][this.keys[1]] ?? UNKNOWN_KEY] = { |
|
|
@ -278,12 +280,14 @@ export class GfPortfolioProportionChartComponent |
|
|
|
|
|
|
|
|
Object.keys(item.subCategory ?? {}).forEach((subCategory) => { |
|
|
Object.keys(item.subCategory ?? {}).forEach((subCategory) => { |
|
|
if (item.name === UNKNOWN_KEY) { |
|
|
if (item.name === UNKNOWN_KEY) { |
|
|
|
|
|
// @ts-ignore
|
|
|
backgroundColorSubCategory.push(item.color); |
|
|
backgroundColorSubCategory.push(item.color); |
|
|
} else { |
|
|
} else { |
|
|
backgroundColorSubCategory.push( |
|
|
backgroundColorSubCategory.push( |
|
|
Color(item.color).lighten(lightnessRatio).hex() |
|
|
Color(item.color).lighten(lightnessRatio).hex() |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
// @ts-ignore
|
|
|
dataSubCategory.push(item.subCategory[subCategory].value.toNumber()); |
|
|
dataSubCategory.push(item.subCategory[subCategory].value.toNumber()); |
|
|
labelSubCategory.push(subCategory); |
|
|
labelSubCategory.push(subCategory); |
|
|
|
|
|
|
|
|
|