louisnw01 / lightweight-charts-python

Python framework for TradingView's Lightweight Charts JavaScript library.
MIT License
933 stars 178 forks source link

[BUG] NO graph being plotted. #413

Open mohittgupta opened 1 week ago

mohittgupta commented 1 week ago

Expected Behavior

Hello ,

Till yesterday candlestick chart used to be plotted and displayed. But now just a blank screen is being shown.

Current Behaviour

Blank screen , no chart is loading.

image

Reproducible Example

import yfinance as yf
import pandas as pd
from lightweight_charts import Chart

# 1. Fetch TCS Stock Data
ticker = "TCS.NS"
data = yf.download(ticker, period="1y")

# 2. Convert Time Index to Datetime and Format for Charting
df_reset = data.reset_index()

df_reset = df_reset.rename(columns={'index': 'time', 'Open':'open', 'High':'high', 'Close':'close' ,'Low':'low', 'Volume':'volume'})
# 3. Create and Customize the Chart
chart = Chart(toolbox=True, maximize=True, on_top=True)

chart.legend(visible=True, font_size=14)

chart.set(df_reset)

chart.show(block=True)

Environment

- OS:
- Library:
bhavishyagoyal12 commented 1 week ago

I am also facing same issue with even simple code

[import pandas as pd from lightweight_charts import Chart

if name == 'main':

chart = Chart()

# Columns: time | open | high | low | close | volume 
df = pd.read_csv('ohlcv.csv')
chart.set(df)

chart.show(block=True)](url)

](url)

bhavishyagoyal12 commented 1 week ago

Could it because TradingView release new version

https://github.com/tradingview/lightweight-charts

bhavishyagoyal12 commented 1 week ago

@louisnw01 Can you please check why this is not working

bhavishyagoyal12 commented 1 week ago

@louisnw01 May i request to please check this ?