- {isTruncated && (
-
- {t('echartsChart.tableNotice', {
- visibleRows: visibleRows.length,
- totalRows: rows.length,
- visibleColumns: visibleColumns.length,
- totalColumns: columns.length,
- omittedRows,
- omittedColumns,
- })}
-
- )}
-
-
-
- {visibleColumns.map((column, columnIndex) => (
- | {column} |
- ))}
-
-
-
- {visibleRows.map((row, rowIndex) => (
-
- {visibleColumns.map((column, columnIndex) => (
- |
- {formatCell(getCell(row, column, columnIndex))}
- |
- ))}
-
- ))}
-
-
-
- );
-}
-
-function EchartsDataTable({
- columns,
- rows,
-}: {
- columns: string[];
- rows: DatasetSource;
-}) {
- const { t } = useI18n();
- const isEmpty = columns.length === 0 || rows.length === 0;
- const isOversized =
- rows.length > MAX_ENHANCED_TABLE_ROWS ||
- columns.length > MAX_ENHANCED_TABLE_COLUMNS;
- const table = useMemo(
- () =>
- isEmpty || isOversized ? undefined : toEnhancedTableData(columns, rows),
- [columns, isEmpty, isOversized, rows],
- );
-
- if (isEmpty) {
- return