OptionalpaneIndex: numberOptionalcoordinateOptionalcoordinateThe event bus. The controller listens for click, crosshair:move,
drag, drag:end and dblclick, and for hover ({ id }, the hit id
under the pointer whenever it changes), which is what drives the hover
state: the chart has already hit-tested the move, so the controller
reads its answer rather than testing a second time. A host that never
emits hover has drawings that select and drag but do not light up.
OptionalpanesOptional, and used only to keep a paste from a chart with more panes than this one landing on a pane the user cannot see. Adding a primitive creates the pane it names, so without this a drawing copied out of an indicator pane would conjure an empty pane in a single-pane chart.
OptionalpriceOptional, and used only to move a drawing by a fixed screen distance (a paste offset, an arrow-key nudge, a multi-drag across panes). Going through pixels rather than adding a price delta keeps the offset the same visible nudge on a log scale as on a linear one, and the same on an RSI pane as on the price pane. A host without them still gets the time half.
OptionalpaneIndex: numberOptionalsetOptionaltime
The slice of the chart this controller needs.
Declared structurally rather than as
Charton purpose. Each tier ships its own bundled.d.ts, so naming the class here made the draw tier re-declareChart, and becauseCharthas private members, TypeScript treats the two declarations as different types. A TS consumer passing the chart fromcreateChart()got "separate declarations of a private property", which made the tier unusable from TypeScript at all. An interface with no private members is structural, so the realChartsatisfies it with nothing to cast.