From 9a8f6978baff21068e0240ff040ea47789ffd0e4 Mon Sep 17 00:00:00 2001 From: Aleksey Vlasenko Date: Tue, 11 Feb 2025 21:16:06 -0800 Subject: [PATCH] fixing JupyterChart to be able to display non-overlay indicators properly --- lightweight_charts/widgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightweight_charts/widgets.py b/lightweight_charts/widgets.py index c347c45d..cb5711d5 100644 --- a/lightweight_charts/widgets.py +++ b/lightweight_charts/widgets.py @@ -177,7 +177,7 @@ def __init__(self, width: int = 800, height=350, inner_width=1, inner_height=1, document.getElementById('container').style.width = '{self.width}px' document.getElementById('container').style.height = '100%' ''') - self.run_script(f'{self.id}.chart.resize({width}, {height})') + self.run_script(f'{self.id}.chart.resize({width * inner_width}, {height * inner_height})') def _load(self): if HTML is None: