mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-15 23:47:33 +08:00
code refactor
This commit is contained in:
@@ -74,7 +74,7 @@ export function usePieChartBase(props: CommonPieChartProps) {
|
||||
};
|
||||
|
||||
finalItem.displayPercent = formatPercent(finalItem.percent, 2, '<0.01');
|
||||
finalItem.displayValue = formatAmountWithCurrency(finalItem.value, props.defaultCurrency) as string;
|
||||
finalItem.displayValue = formatAmountWithCurrency(finalItem.value, props.defaultCurrency);
|
||||
|
||||
validItems.push(finalItem);
|
||||
}
|
||||
|
||||
@@ -238,8 +238,8 @@ const yAxisWidth = computed<number>(() => {
|
||||
}
|
||||
}
|
||||
|
||||
const maxValueText = formatAmountWithCurrency(maxValue, props.defaultCurrency) || '';
|
||||
const minValueText = formatAmountWithCurrency(minValue, props.defaultCurrency) || '';
|
||||
const maxValueText = formatAmountWithCurrency(maxValue, props.defaultCurrency);
|
||||
const minValueText = formatAmountWithCurrency(minValue, props.defaultCurrency);
|
||||
const maxLengthText = maxValueText.length > minValueText.length ? maxValueText : minValueText;
|
||||
|
||||
const canvas = document.createElement('canvas');
|
||||
|
||||
Reference in New Issue
Block a user