(
kind: Kind,
{
descending,
limit,
offset,
queries,
queryId,
sortCellId,
store,
tableId,
xCellId,
yCellId,
}: AliasProps,
)
| 19 | ChartProps; |
| 20 | |
| 21 | export const useInitialSeriesSummary = ( |
| 22 | kind: Kind, |
| 23 | { |
| 24 | descending, |
| 25 | limit, |
| 26 | offset, |
| 27 | queries, |
| 28 | queryId, |
| 29 | sortCellId, |
| 30 | store, |
| 31 | tableId, |
| 32 | xCellId, |
| 33 | yCellId, |
| 34 | }: AliasProps, |
| 35 | ): SeriesSummary | undefined => { |
| 36 | const storeObject = useStoreOrStoreById(store); |
| 37 | const queriesObject = useQueriesOrQueriesById(queries); |
| 38 | |
| 39 | return useMemo(() => { |
| 40 | const points = isNullish(tableId) |
| 41 | ? getDataPoints( |
| 42 | queriesObject?.getResultSortedRowIds( |
| 43 | queryId ?? EMPTY_STRING, |
| 44 | sortCellId ?? xCellId, |
| 45 | descending, |
| 46 | offset, |
| 47 | limit, |
| 48 | ) ?? [], |
| 49 | (rowId) => |
| 50 | getDataPoint( |
| 51 | rowId, |
| 52 | queriesObject?.getResultCell( |
| 53 | queryId ?? EMPTY_STRING, |
| 54 | rowId, |
| 55 | xCellId, |
| 56 | ), |
| 57 | queriesObject?.getResultCell( |
| 58 | queryId ?? EMPTY_STRING, |
| 59 | rowId, |
| 60 | yCellId, |
| 61 | ), |
| 62 | ), |
| 63 | ) |
| 64 | : getDataPoints( |
| 65 | storeObject?.getSortedRowIds( |
| 66 | tableId, |
| 67 | sortCellId ?? xCellId, |
| 68 | descending, |
| 69 | offset, |
| 70 | limit, |
| 71 | ) ?? [], |
| 72 | (rowId) => |
| 73 | getDataPoint( |
| 74 | rowId, |
| 75 | storeObject?.getCell(tableId, rowId, xCellId), |
| 76 | storeObject?.getCell(tableId, rowId, yCellId), |
| 77 | ), |
| 78 | ); |
no test coverage detected
searching dependent graphs…