lightweight-charts-python icon indicating copy to clipboard operation
lightweight-charts-python copied to clipboard

Sync among diffrent instances

Open esteban2006 opened this issue 7 months ago • 0 comments

Description

@louisnw01 thank you for such an amazing lib, honestly the way webview js, and python mingle together is really outstanding,I wish We could have the time to approach all the benefits of the lightweight chart by TV, but I know it so much,

Feature: Sync among diffrent instances : Running a chart on separated thread and still be able to to sync on all the open threads

https://github.com/user-attachments/assets/698921c7-05f2-430f-860d-041ca2138ae7

Code example

self.chart = Chart(
            toolbox=True,
            width=1400 if self.account != "DEVELOPER MODE" else 600,
            inner_width=self.settings["chart"]["chartWith"],
            inner_height=self.settings["chart"]["chartHeight"],
            title=f"{buildName}",
            thread_id = "main_chart"
        )

Method of implementation

by adding a thread_id on the chart creation maybe zoom and scales position could be trackable ... and then be passed to other instances

esteban2006 avatar Jul 28 '24 19:07 esteban2006