louisnw01 / lightweight-charts-python

Python framework for TradingView's Lightweight Charts JavaScript library.
MIT License
1.06k stars 195 forks source link

[BUG] Legend Api Update Not Updating #445

Open esteban2006 opened 1 month ago

esteban2006 commented 1 month ago

Expected Behavior

When chart.legend (params) is called should update accordingly,

Current Behaviour

Api only updating

the rest of the params are not having effect on the current object

https://github.com/user-attachments/assets/6f2879fa-1ca5-479b-a46c-9d96459f5472

Reproducible Example

calling lengend()

if chart is not None:
    chart.legend(
        color=settings["color"],
        visible=settings["visible"],
        ohlc=settings["ohlc"],
        percent=settings["percent"],
        lines=settings["lines"],
        font_size=settings["font_size"],
        font_family=settings["font_family"],
    )

Environment

- OS: Windown-s
- Library: v2.0.1
esteban2006 commented 1 month ago

chart.grid()

is showing the same problem with

esteban2006 commented 1 month ago

applying style

chart.grid("style": "doted") will make the graph to dissappear