UNPKG

@apptane/react-ui-charts

Version:
12 lines (11 loc) 615 B
import { ScaleBand } from "d3-scale"; import { DomainXValue, DomainYValue } from "../common/Types.js"; import { XYChartDatum, XYChartValue } from "./XYChart.types.js"; /** * Returns inverse function for d3-scaleBand */ export declare function scaleBandInvert<T>(scale: ScaleBand<T>): (value: number) => T; /** * Finds primary or secondary value that matches the criteria in the predicate. */ export declare function findValue<X extends DomainXValue, Y extends DomainYValue, Data = void>(datum: XYChartDatum<X, Y, Data>, predicate: (p: XYChartValue<X, Y>) => boolean): XYChartValue<X, Y> | undefined;