order.d.ts 753 B

123456789
  1. import { Primitive } from 'd3-array';
  2. import { TabularData, G2Mark } from '../../runtime';
  3. export type IndexComparatorFactory = (data: TabularData, Y: Primitive[], S: Primitive[]) => IndexComparator;
  4. export type IndexComparator = (i: number, j: number) => number;
  5. export type Order = 'value' | 'sum' | 'series' | 'maxIndex' | string[] | ((data: Record<string, Primitive>) => Primitive);
  6. export declare function createGroups(groupBy: string | string[], I: number[], mark: G2Mark): number[][];
  7. export declare function normalizeComparator(order: Order): IndexComparatorFactory;
  8. export declare function applyOrder(groups: number[][], comparator: IndexComparator): void;
  9. export declare function domainOf(value: Primitive[], scale: Record<string, any>): any;