MAIDR Documentation - v3.69.0
    Preparing search index...
    • Generates per-candle CandlestickSelector entries for a Highcharts candlestick series.

      MAIDR's CandlestickTrace expects either a single legacy selector string or a structured CandlestickSelector whose fields (body, wickHigh, wickLow, ...) name the sub-elements per candle so they can be highlighted individually.

      Highcharts renders each candlestick as a single <path class="highcharts-point"> whose d attribute contains three subpaths:

      M x_left y_open L x_left y_close L x_right y_close L x_right y_open Z   <-- body (rect-with-Z)
      M x_mid y_top L x_mid y_bodyTop <-- upper wick
      M x_mid y_bodyBot L x_mid y_low <-- lower wick

      (subpath order varies between Highcharts releases; ordering is not assumed).

      The adapter (see stampCandlestickIndices / splitCandlestickPath in adapter.ts) is responsible for splitting that single <path> into three separate <path> siblings stamped with:

      • data-maidr-candle-index="N" (per-candle disambiguator)
      • data-maidr-candle-part="body" | "upper-wick" | "lower-wick" (sub-element)

      The original <path> loses its highcharts-point class so future class-only queries skip it. This mirrors the boxplot whisker split (see splitWhiskerPath).

      Trade-off: open/close are not provided as separate selectors. MAIDR's CandlestickTrace derives open/close line segments from the body's edges via Svg.createLineElement when omitted, which is sufficient for highlighting the open/close marks.

      Parameters

      • containerId: string
      • seriesIndex: number
      • candleCount: number

      Returns CandlestickSelector