/** * A candle plot: one declaration, four columns. * * `plotCandles` is one entry with one key and one legend row, and the four * values it draws travel as four ordinary columns that the entry names. The * chart's descriptor has exactly that shape, so the mapping is a rename. * * The colours are where the two contracts differ and the difference is worth * stating. A candle's colour is declared four ways: one for a bar that closed at * or above its open, one for a bar that closed below, and two overrides for the * wick and the border alone. Where all four are constants they are the series' * own style and cost nothing per bar. Where a script passed a series colour * instead, the value arrives on a channel and the colour is decided per bar, * which is the split callback the chart takes. * * **A null override means the wick or the border follows the body**, which is * the opposite of a null colour on a line plot: the host may choose an * undecorated line's colour because nothing depends on it, and a wick the host * coloured independently of the body it grows out of would draw a different * candle on every chart. So an override with neither a channel nor a declared * value is answered with the body's own colour for that bar, and one with a * declared value is left alone for the style to carry. */ import type { CandleChannels } from '../../core/emit/index.js'; import type { ChartBarColor, ChartColorContext, ChartSeriesStyle } from './contract.js'; import type { ColumnSpec } from './columns.js'; import type { InputLookup } from './fields.js'; export interface CandleBuild { readonly ohlc: { readonly open: string; readonly high: string; readonly low: string; readonly close: string; }; readonly style: ChartSeriesStyle; readonly columns: readonly ColumnSpec[]; readonly colorParts: ((ctx: ChartColorContext) => ChartBarColor | undefined) | undefined; } export declare function buildCandle(key: string, ohlc: CandleChannels, lookup: InputLookup): CandleBuild; //# sourceMappingURL=candles.d.ts.map