• Pure: optimal candle body width in device px for a given bar spacing. Leaves a ~1px gap between candles, keeps a minimum of 1px, and matches odd/even parity with the wick so the body stays symmetric about the (1px) wick.

    Parameters

    • barSpacing: number
    • dpr: number

    Returns number