diff --git a/src/App.tsx b/src/App.tsx index 12330a3..9d9515c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -21,7 +21,6 @@ const statisticOptions = [ { key: 'maxValue', label: '最高值', shortLabel: '高' }, { key: 'avgValue', label: '平均值', shortLabel: '均' }, { key: 'medianValue', label: '中位数', shortLabel: '中' }, - { key: 'dataCount', label: '数据量', shortLabel: '量' }, ] as const; const metricOptions = [ @@ -29,6 +28,7 @@ const metricOptions = [ { key: 'buildingArea', label: '建筑面积指标(元/m²)' }, { key: 'builtArea', label: '建造面积指标(元/m²)' }, { key: 'usableArea', label: '使用面积指标(元/m²)' }, + { key: 'dataCount', label: '数据量' }, ] as const; const contentOptions = [ @@ -179,8 +179,8 @@ function formatAreaMetricValue(value: number) { return `${formatNumber(value, fractionDigits)}元/m²`; } -function formatChartValue(value: number, metricKey: MetricKey, statisticKey: StatisticKey) { - if (statisticKey === 'dataCount') { +function formatChartValue(value: number, metricKey: MetricKey) { + if (metricKey === 'dataCount') { return formatNumber(value, 0); } if (metricKey === 'cost') { @@ -306,7 +306,7 @@ function renderTreeNodes(