From 92b8fd0a04503a6c602cf9046dc81baaaceb6bfd Mon Sep 17 00:00:00 2001 From: louisnw Date: Fri, 22 Dec 2023 00:23:51 +0000 Subject: [PATCH] Update examples to fit ms timestamps Cleanup PolygonChart `title`, `screen` error. --- README.md | 2 +- examples/3_tick_data/tick_data.py | 2 +- lightweight_charts/polygon.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9846502..8636bac 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ if __name__ == '__main__': df1 = pd.read_csv('ohlc.csv') # Columns: time | price - df2 = pd.read_csv('ticks.csv') + df2 = pd.read_csv('ticks.csv', parse_dates=['time']) chart = Chart() diff --git a/examples/3_tick_data/tick_data.py b/examples/3_tick_data/tick_data.py index 5d3217d..3337b65 100644 --- a/examples/3_tick_data/tick_data.py +++ b/examples/3_tick_data/tick_data.py @@ -7,7 +7,7 @@ if __name__ == '__main__': df1 = pd.read_csv('ohlc.csv') # Columns: time | price - df2 = pd.read_csv('ticks.csv') + df2 = pd.read_csv('ticks.csv', parse_dates=['time']) chart = Chart() diff --git a/lightweight_charts/polygon.py b/lightweight_charts/polygon.py index af134eb..623f51e 100644 --- a/lightweight_charts/polygon.py +++ b/lightweight_charts/polygon.py @@ -406,7 +406,7 @@ class PolygonChart(Chart): on_top: bool = False, maximize: bool = False, debug: bool = False, title: str = '', screen: int = None, ): - super().__init__(width, height, x, y, title,screen,on_top, maximize, debug, toolbox) + super().__init__(width, height, x, y, title, screen, on_top, maximize, debug, toolbox) self.num_bars = num_bars self.end_date = end_date