@thi.ng/viz
Version:
Declarative, functional & multi-format data visualization toolkit based around @thi.ng/hiccup
22 lines • 781 B
TypeScript
import type { Fn2, Fn4, NumOrString } from "@thi.ng/api";
import type { DomainValues, PlotFn } from "../api.js";
export type Candle = {
o: number;
h: number;
l: number;
c: number;
};
export type MappedCandle = Record<keyof Candle, number[]>;
export type CandleShapeFn = Fn4<Candle, MappedCandle, number, boolean, any>;
export interface CandlePlotOpts {
shape: CandleShapeFn;
}
export interface CandleShapeOpts {
up: Fn2<number, Candle, any>;
down: Fn2<number, Candle, any>;
title: Fn2<number, Candle, NumOrString>;
width: number;
}
export declare const candlePlot: (data: DomainValues<Candle>, opts?: CandlePlotOpts) => PlotFn;
export declare const candle: (opts?: Partial<CandleShapeOpts>) => CandleShapeFn;
//# sourceMappingURL=candle.d.ts.map