openbb-technical 1.3.2__tar.gz → 1.3.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openbb-technical
3
- Version: 1.3.2
3
+ Version: 1.3.4
4
4
  Summary: Technical Analysis extension for OpenBB
5
5
  License: AGPL-3.0-only
6
6
  Author: OpenBB Team
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 3.10
13
13
  Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Requires-Dist: numpy (>=1,<2)
16
- Requires-Dist: openbb-core (>=1.3.2,<2.0.0)
16
+ Requires-Dist: openbb-core (>=1.3.5,<2.0.0)
17
17
  Requires-Dist: pandas-ta (>=0.3.14b,<0.4.0)
18
18
  Requires-Dist: scikit-learn (>=1.5.0,<2.0.0)
19
19
  Requires-Dist: scipy (>=1.10.1,<2.0.0)
@@ -289,8 +289,12 @@ class TechnicalViews:
289
289
  fig.set_title(title)
290
290
 
291
291
  fig.update_layout(
292
- paper_bgcolor="rgba(0,0,0,0)",
293
- plot_bgcolor="rgba(0,0,0,0)",
292
+ paper_bgcolor=(
293
+ "rgba(0,0,0,0)" if text_color == "white" else "rgba(255,255,255,0)"
294
+ ),
295
+ plot_bgcolor=(
296
+ "rgba(0,0,0,0)" if text_color == "white" else "rgba(255,255,255,0)"
297
+ ),
294
298
  font=dict(color=text_color),
295
299
  legend=dict(
296
300
  orientation="h",
@@ -298,7 +302,9 @@ class TechnicalViews:
298
302
  xanchor="right",
299
303
  y=1.02,
300
304
  x=1,
301
- bgcolor="rgba(0,0,0,0)",
305
+ bgcolor=(
306
+ "rgba(0,0,0,0)" if text_color == "white" else "rgba(255,255,255,0)"
307
+ ),
302
308
  ),
303
309
  yaxis=dict(
304
310
  ticklen=0,
@@ -366,7 +372,9 @@ class TechnicalViews:
366
372
  figure = OpenBBFigure(fig) # pylint: disable=E0606
367
373
  font_color = "black" if ChartStyle().plt_style == "light" else "white"
368
374
  figure.update_layout(
369
- paper_bgcolor="rgba(0,0,0,0)",
375
+ paper_bgcolor=(
376
+ "rgba(0,0,0,0)" if font_color == "white" else "rgba(255,255,255,255)"
377
+ ),
370
378
  plot_bgcolor="rgba(255,255,255,1)",
371
379
  font=dict(color=font_color),
372
380
  yaxis=dict(
@@ -473,7 +481,7 @@ def _ta_ma(**kwargs):
473
481
  specs=[[{"secondary_y": True}]],
474
482
  )
475
483
  fig.update_layout(ChartStyle().plotly_template.get("layout", {}))
476
-
484
+ font_color = "black" if ChartStyle().plt_style == "light" else "white"
477
485
  ma_df = DataFrame()
478
486
  window = [window] if isinstance(window, int) else window
479
487
  for w in window:
@@ -511,8 +519,12 @@ def _ta_ma(**kwargs):
511
519
 
512
520
  fig.update_layout(
513
521
  title=dict(text=title, x=0.5, font=dict(size=16)),
514
- paper_bgcolor="rgba(0,0,0,0)",
515
- plot_bgcolor="rgba(0,0,0,0)",
522
+ paper_bgcolor=(
523
+ "rgba(0,0,0,0)" if font_color == "white" else "rgba(255,255,255,255)"
524
+ ),
525
+ plot_bgcolor=(
526
+ "rgba(0,0,0,0)" if font_color == "white" else "rgba(255,255,255,0)"
527
+ ),
516
528
  showlegend=True,
517
529
  legend=dict(
518
530
  orientation="h",
@@ -520,7 +532,7 @@ def _ta_ma(**kwargs):
520
532
  xanchor="right",
521
533
  y=1.02,
522
534
  x=0.95,
523
- bgcolor="rgba(0,0,0,0)",
535
+ bgcolor="rgba(0,0,0,0)" if font_color == "white" else "rgba(255,255,255,0)",
524
536
  ),
525
537
  xaxis=dict(
526
538
  ticklen=0,
@@ -537,6 +549,7 @@ def _ta_ma(**kwargs):
537
549
  mirror=True,
538
550
  autorange=True,
539
551
  ),
552
+ font=dict(color=font_color),
540
553
  )
541
554
 
542
555
  content = fig.show(external=True).to_plotly_json()
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "openbb-technical"
3
- version = "1.3.2"
3
+ version = "1.3.4"
4
4
  description = "Technical Analysis extension for OpenBB"
5
5
  authors = ["OpenBB Team <hello@openbb.co>"]
6
6
  license = "AGPL-3.0-only"
@@ -9,7 +9,7 @@ packages = [{ include = "openbb_technical" }]
9
9
 
10
10
  [tool.poetry.dependencies]
11
11
  python = ">=3.9,<3.13" # scipy forces python <4.0 explicitly
12
- openbb-core = "^1.3.2"
12
+ openbb-core = "^1.3.5"
13
13
  scipy = "^1.10.1"
14
14
  statsmodels = "^0.14.0"
15
15
  scikit-learn = "^1.5.0"