Exciting Update: Version 1.0.0 is now available, introducing high-performance technical indicators and custom drawing tools. Read more
Version: 1.0.0

Candlestick Widths

Candlestick components (the body and the vertical wicks) must align to pixel coordinates. This ensures that body rectangles look solid and wicks look sharp.

Body vs Wick Widths

The width parameters depend on the slot allocated per bar. If the slot width is S:

  • Wick Width: Set to a fixed 1px (drawn at x + 0.5) to maintain absolute crispness.
  • Body Width: Set to Math.floor(S * 0.7) (maintaining a 30% gap between candles). If the calculated width is odd, center it on a half-pixel boundary; if it is even, center it on an integer boundary.