|
|
@ -30,7 +30,6 @@ import { |
|
|
DoughnutController, |
|
|
DoughnutController, |
|
|
LinearScale, |
|
|
LinearScale, |
|
|
Tooltip, |
|
|
Tooltip, |
|
|
type TooltipItem, |
|
|
|
|
|
type TooltipOptions |
|
|
type TooltipOptions |
|
|
} from 'chart.js'; |
|
|
} from 'chart.js'; |
|
|
import ChartDataLabels from 'chartjs-plugin-datalabels'; |
|
|
import ChartDataLabels from 'chartjs-plugin-datalabels'; |
|
|
@ -442,7 +441,7 @@ export class GfPortfolioProportionChartComponent |
|
|
}), |
|
|
}), |
|
|
// @ts-expect-error: no need to set all attributes in callbacks
|
|
|
// @ts-expect-error: no need to set all attributes in callbacks
|
|
|
callbacks: { |
|
|
callbacks: { |
|
|
label: (context: TooltipItem<'doughnut'>) => { |
|
|
label: (context) => { |
|
|
const labelIndex = |
|
|
const labelIndex = |
|
|
(data.datasets[context.datasetIndex - 1]?.data?.length ?? 0) + |
|
|
(data.datasets[context.datasetIndex - 1]?.data?.length ?? 0) + |
|
|
context.dataIndex; |
|
|
context.dataIndex; |
|
|
|