MAIDR JavaScript API
    Preparing search index...

    Function candlestickLayer

    • Builds the layer for one candlestick series.

      ECharts hands over the four prices already named -- open, close, lowest, highest -- so nothing is recovered from the drawing. The period's label comes from the category axis through getName, the way every other categorical reading here takes it.

      volatility is the day's range, which is the convention every other candlestick producer in this tree uses.

      The selectors go in CandlestickSelector.body and not in a bare list. Candlestick.mapToSvgElements reads an array as the legacy shape -- one selector for the whole chart -- and takes selectors[0] for every candle, so a per-candle list would outline the first candle wherever the reader stood. Only body is filled: ECharts draws a candle as one path holding the body and its wick together, so there is no separate element to name a wick with, and the trace derives what it can from the body.

      Parameters

      • seriesModel: EChartsSeriesModel

        The series to read

      • names: AxisNames

        The axis titles

      • selectors: string[] | undefined

        One selector per drawn candle, in data order

      Returns MaidrLayer

      The layer