[Python] Why does my chart not render when using addSeries(CandlestickSeries) or...

Discussão em 'Python' iniciado por Stack, Maio 28, 2025.

  1. Stack

    Stack Membro Participativo

    I'm building a stock charting frontend using React and the latest version of lightweight-charts (v5.x). I want to display candlestick charts using data fetched from my backend (Flask API serving OHLC data).

    What I'm trying to do I want to render a candlestick chart in a React component. I'm using either addSeries(CandlestickSeries) or addCandlestickSeries() as per the official docs. My data is fetched from the backend and has the correct format: { time: 'YYYY-MM-DD', open: ..., high: ..., low: ..., close: ... }

    What I've tried Both addCandlestickSeries() and addSeries(CandlestickSeries) Ensuring the container div has explicit width and height Confirmed the data format matches the docs Upgraded to the latest lightweight-charts (5.0.7) Used both direct import and destructured import for CandlestickSeries

    What I want I want to understand if there are any known issues or extra requirements for rendering candlestick charts with addSeries(CandlestickSeries) or addCandlestickSeries() in React with lightweight-charts v5. Is there a difference between these two methods in v5? Are there any React-specific caveats or initialization steps I might be missing?

    Continue reading...

Compartilhe esta Página