diff --git a/candlestick_chart_example.py b/candlestick_chart_example.py index f976975..c80b37d 100644 --- a/candlestick_chart_example.py +++ b/candlestick_chart_example.py @@ -15,4 +15,4 @@ candlestick_chart = CandlestickChart( lows = data['Low'], closes = data['Close'] ) -plot(candlestick_chart).show() \ No newline at end of file +plot(candlestick_chart) \ No newline at end of file diff --git a/line_chart_example.py b/line_chart_example.py index 8759834..a242fa1 100644 --- a/line_chart_example.py +++ b/line_chart_example.py @@ -13,4 +13,4 @@ line_chart = LineChart( y = data['Close'], name = 'SPX' ) -plot(line_chart).show() \ No newline at end of file +plot(line_chart) \ No newline at end of file diff --git a/plot.py b/plot.py index 9b300b3..4b0aa82 100644 --- a/plot.py +++ b/plot.py @@ -3,7 +3,7 @@ from plotly.graph_objects import Figure from plotly.subplots import make_subplots from typing import List -def plot_with_subplots(subplots: List[List[Chart]]) -> Figure: +def figure_with_subplots(subplots: List[List[Chart]]) -> Figure: num_rows = len(subplots) num_columns = len(subplots[0]) @@ -28,5 +28,5 @@ def plot_with_subplots(subplots: List[List[Chart]]) -> Figure: return figure -def plot(chart: Chart) -> Figure: - return plot_with_subplots([[chart]]) \ No newline at end of file +def plot(chart: Chart) -> None: + figure_with_subplots([[chart]]).show(config={'displayModeBar': False}) \ No newline at end of file