lightweight-charts-python
lightweight-charts-python copied to clipboard
Legend only allows float, 2
Expected Behavior
Legend should allow (float, x) where x is the market's digits
Current Behaviour
In the image above, We can see that price precision is 5, but legend remains 2, I am also adding data.csv so you try it yourself.
Reproducible Example
import pandas as pd
from lightweight_charts import Chart
if __name__ == "__main__":
chart = Chart()
df = pd.read_csv("data.csv")
chart.set(df)
chart.legend(
color="#FFFFFF",
visible=True,
ohlc=True,
percent=True,
lines=True,
)
chart.precision(5)
line_name = "EMA_18"
line = chart.create_line(name=line_name, color="white")
line.set(df[["time", line_name]])
chart.show(block=True)
Environment
- OS: Windown
- Library: v2.0.1