add chart tab to insights & explore page

This commit is contained in:
MaysWind
2025-12-28 23:58:38 +08:00
parent 28337ae228
commit e74d290016
27 changed files with 1423 additions and 15 deletions
+2 -1
View File
@@ -31,6 +31,7 @@ export interface CommonPieChartProps {
colorField?: string;
hiddenField?: string;
minValidPercent?: number;
amountValue?: boolean;
defaultCurrency?: string;
showValue?: boolean;
showPercent?: boolean;
@@ -74,7 +75,7 @@ export function usePieChartBase(props: CommonPieChartProps) {
};
finalItem.displayPercent = formatPercentToLocalizedNumerals(finalItem.percent, 2, '<0.01');
finalItem.displayValue = formatAmountToLocalizedNumeralsWithCurrency(finalItem.value, props.defaultCurrency);
finalItem.displayValue = props.amountValue ? formatAmountToLocalizedNumeralsWithCurrency(finalItem.value, props.defaultCurrency) : finalItem.value.toString();
validItems.push(finalItem);
}