MAIDR Documentation - v3.65.0
    Preparing search index...

    Interface D3CandlestickConfig

    Configuration for binding a D3 candlestick chart.

    interface D3CandlestickConfig {
        id?: string;
        title?: string;
        subtitle?: string;
        caption?: string;
        axes?: { x?: D3AxisInput; y?: D3AxisInput; fill?: D3AxisInput };
        format?: AxisFormat;
        autoApply?: boolean;
        selector: string;
        value?: DataAccessor<string>;
        open?: DataAccessor<number>;
        high?: DataAccessor<number>;
        low?: DataAccessor<number>;
        close?: DataAccessor<number>;
        volume?: DataAccessor<number>;
        trend?: DataAccessor<"Bull" | "Bear" | "Neutral">;
    }

    Hierarchy (View Summary)

    Index

    Properties

    id?: string

    Unique identifier for the chart. Used as the MAIDR id.

    title?: string

    Chart title displayed in text descriptions.

    subtitle?: string

    Chart subtitle.

    caption?: string

    Chart caption.

    axes?: { x?: D3AxisInput; y?: D3AxisInput; fill?: D3AxisInput }

    Axis configuration. Each axis may be provided as either a plain string (shorthand for { label: value }) or a full AxisConfig object (for per-axis format, or grid navigation on scatter).

    For heatmaps and segmented bar charts, use fill for the color/category axis; the binder maps it to the canonical z axis in the MAIDR schema.

    Type Declaration

    format?: AxisFormat

    Optional formatting configuration applied to axes that do not specify their own format. Per-axis format on AxisConfig takes precedence.

    autoApply?: boolean

    When true (the default), the binder writes the generated MAIDR schema to the SVG as a maidr-data attribute so vanilla-JS users don't need to call svg.setAttribute(...) themselves. The returned result is unchanged either way.

    Set to false if you are driving MAIDR yourself — e.g. passing the returned schema to <Maidr data={...}> or persisting it elsewhere. The React adapter (useD3Adapter, MaidrD3) forces this to false internally so it can stay in control of the schema.

    true
    
    selector: string

    CSS selector for the candlestick body elements (e.g., 'rect.candle').

    value?: DataAccessor<string>

    Accessor for the label/date value.

    'value'
    
    open?: DataAccessor<number>

    Accessor for the open price.

    'open'
    
    high?: DataAccessor<number>

    Accessor for the high price.

    'high'
    
    low?: DataAccessor<number>

    Accessor for the low price.

    'low'
    
    close?: DataAccessor<number>

    Accessor for the close price.

    'close'
    
    volume?: DataAccessor<number>

    Accessor for the trading volume.

    'volume'
    
    trend?: DataAccessor<"Bull" | "Bear" | "Neutral">

    Accessor for the trend direction. Auto-computed from open/close if not provided.