|
@ -91,7 +91,7 @@ export class GfTreemapChartComponent |
|
|
datasets: [ |
|
|
datasets: [ |
|
|
{ |
|
|
{ |
|
|
backgroundColor(ctx) { |
|
|
backgroundColor(ctx) { |
|
|
const annualizedNetPerformancePercentWithCurrencyEffect = |
|
|
let annualizedNetPerformancePercentWithCurrencyEffect = |
|
|
getAnnualizedPerformancePercent({ |
|
|
getAnnualizedPerformancePercent({ |
|
|
daysInMarket: differenceInDays( |
|
|
daysInMarket: differenceInDays( |
|
|
endDate, |
|
|
endDate, |
|
@ -105,6 +105,12 @@ export class GfTreemapChartComponent |
|
|
) |
|
|
) |
|
|
}).toNumber(); |
|
|
}).toNumber(); |
|
|
|
|
|
|
|
|
|
|
|
// Round to 2 decimal places
|
|
|
|
|
|
annualizedNetPerformancePercentWithCurrencyEffect = |
|
|
|
|
|
Math.round( |
|
|
|
|
|
annualizedNetPerformancePercentWithCurrencyEffect * 100 |
|
|
|
|
|
) / 100; |
|
|
|
|
|
|
|
|
if ( |
|
|
if ( |
|
|
annualizedNetPerformancePercentWithCurrencyEffect > |
|
|
annualizedNetPerformancePercentWithCurrencyEffect > |
|
|
0.03 * GfTreemapChartComponent.HEAT_MULTIPLIER |
|
|
0.03 * GfTreemapChartComponent.HEAT_MULTIPLIER |
|
@ -123,8 +129,11 @@ export class GfTreemapChartComponent |
|
|
} else if (annualizedNetPerformancePercentWithCurrencyEffect > 0) { |
|
|
} else if (annualizedNetPerformancePercentWithCurrencyEffect > 0) { |
|
|
return green[3]; |
|
|
return green[3]; |
|
|
} else if ( |
|
|
} else if ( |
|
|
annualizedNetPerformancePercentWithCurrencyEffect === 0 |
|
|
Math.abs(annualizedNetPerformancePercentWithCurrencyEffect) === 0 |
|
|
) { |
|
|
) { |
|
|
|
|
|
annualizedNetPerformancePercentWithCurrencyEffect = Math.abs( |
|
|
|
|
|
annualizedNetPerformancePercentWithCurrencyEffect |
|
|
|
|
|
); |
|
|
return gray[3]; |
|
|
return gray[3]; |
|
|
} else if ( |
|
|
} else if ( |
|
|
annualizedNetPerformancePercentWithCurrencyEffect > |
|
|
annualizedNetPerformancePercentWithCurrencyEffect > |
|
|