This commit is contained in:
wintsa 2026-08-12 09:40:53 +08:00
parent 2e489de7a3
commit d5cce5fd21

View File

@ -935,6 +935,7 @@ function App() {
}, },
[chartSummaryBySelection, selectedContentNodes], [chartSummaryBySelection, selectedContentNodes],
); );
const pivotGridSampleCount = pivotGridPinnedBottomRowData[0]?.dataCount ?? 0;
const pivotGridColumnDefs = useMemo<(ColDef<PivotGridRow> | ColGroupDef<PivotGridRow>)[]>( const pivotGridColumnDefs = useMemo<(ColDef<PivotGridRow> | ColGroupDef<PivotGridRow>)[]>(
() => { () => {
const valueFormatter = ({ value }: ValueFormatterParams<PivotGridRow, number | null>) => ( const valueFormatter = ({ value }: ValueFormatterParams<PivotGridRow, number | null>) => (
@ -982,7 +983,7 @@ function App() {
], ],
}, },
{ {
headerName: `样本统计值(${pivotGridRowData.length}`, headerName: `样本统计值(${formatNumber(pivotGridSampleCount, 0)}`,
children: [ children: [
{ {
field: 'maxValue', field: 'maxValue',
@ -1039,7 +1040,7 @@ function App() {
}, },
]; ];
}, },
[pivotGridRowData.length, requestMetricKey], [pivotGridSampleCount, requestMetricKey],
); );
const fitPivotGridColumns = useCallback(() => { const fitPivotGridColumns = useCallback(() => {
window.requestAnimationFrame(() => { window.requestAnimationFrame(() => {