/** * Declared plots into the chart's plots. * * This is the part of the mapping that is a rename and a table. A plot names a * style, a width, a dash pattern, a scale, an offset and a colour, and every one * of those is a field the chart's plot spec already has. Three places are not a * rename and are worth knowing: * * **A colour a script wrote as an `input()` becomes the settings key rather than * a value.** The chart generates an appearance row per plot, and a descriptor * that already declares a colour input owns that key, so pointing the plot at * the script's own key makes one row drive both the drawn line and the value the * engine computes with. A generated row beside it would shadow the script's, and * changing the script's would silently stop working. * * **A colour a script computed per bar is not a value at all.** It arrives on a * channel, travels as two number columns and is read back by the per-bar colour * callback, which is the only shape a chart's values table has room for. * * **Scale formatting belongs to a scale and not to a series.** A study's own * `precision` and `format` are its pane's, so they reach only the plots that * stay in that pane: setting them on a plot drawn over the price pane would * reformat the instrument's own axis, which is what OS8007 warns a script about * at compile time. */ import type { CompiledProgram } from '../../core/emit/index.js'; import type { ColumnSpec } from './columns.js'; import type { ChartPlot } from './contract.js'; import type { InputLookup } from './fields.js'; export interface PlotsBuild { readonly plots: readonly ChartPlot[]; readonly columns: readonly ColumnSpec[]; } /** * `ownPane` is whether the study draws in a pane of its own, which is what * decides whether the study's own scale formatting reaches a plot at all. */ export declare function buildPlots(program: CompiledProgram, lookup: InputLookup, ownPane: boolean): PlotsBuild; //# sourceMappingURL=plots.d.ts.map