pfund-plot 0.0.3__tar.gz → 0.0.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.
Files changed (56) hide show
  1. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/PKG-INFO +1 -1
  2. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/pyproject.toml +1 -1
  3. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/plot.py +15 -7
  4. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/README.md +0 -0
  5. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/__init__.py +0 -0
  6. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/__main__.py +0 -0
  7. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/cli/__init__.py +0 -0
  8. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/cli/commands/gallery/__init__.py +0 -0
  9. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/cli/commands/gallery/gallery_marimo.py +0 -0
  10. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/cli/commands/serve.py +0 -0
  11. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/cli/main.py +0 -0
  12. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/config.py +0 -0
  13. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/enums/__init__.py +0 -0
  14. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/enums/dataframe_backend.py +0 -0
  15. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/enums/display_mode.py +0 -0
  16. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/enums/panel_design.py +0 -0
  17. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/enums/panel_theme.py +0 -0
  18. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/enums/plotting_backend.py +0 -0
  19. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/js_tap/components/candlestick.js +0 -0
  20. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/mixins/streaming_market_feed_mixin.py +0 -0
  21. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/altair.py +0 -0
  22. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/area/__init__.py +0 -0
  23. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/area/bokeh.py +0 -0
  24. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/bar/__init__.py +0 -0
  25. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/bar/bokeh.py +0 -0
  26. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/bokeh.py +0 -0
  27. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/candlestick/__init__.py +0 -0
  28. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/candlestick/bokeh.py +0 -0
  29. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/candlestick/svelte.py +0 -0
  30. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/holoviews.py +0 -0
  31. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/label/__init__.py +0 -0
  32. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/label/bokeh.py +0 -0
  33. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/layout/__init__.py +0 -0
  34. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/layout/layout.py +0 -0
  35. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/layout/panel.py +0 -0
  36. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/layout/tabs/__init__.py +0 -0
  37. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/layout/tabs/panel.py +0 -0
  38. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/lazy.py +0 -0
  39. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/line/__init__.py +0 -0
  40. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/line/bokeh.py +0 -0
  41. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/matplotlib.py +0 -0
  42. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/plotly.py +0 -0
  43. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/scatter/__init__.py +0 -0
  44. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/scatter/bokeh.py +0 -0
  45. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/scatter/marker.py +0 -0
  46. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/ta.py +0 -0
  47. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/renderers/base.py +0 -0
  48. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/renderers/browser.py +0 -0
  49. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/renderers/desktop.py +0 -0
  50. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/renderers/notebook.py +0 -0
  51. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/typing.py +0 -0
  52. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/utils/__init__.py +0 -0
  53. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/utils/bokeh.py +0 -0
  54. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/widgets/base.py +0 -0
  55. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/widgets/datetime_widget.py +0 -0
  56. {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/widgets/ticker_widget.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pfund-plot
3
- Version: 0.0.3
3
+ Version: 0.0.4
4
4
  Summary: A library for financial data visualization
5
5
  Keywords: financial data,plotting,dashboards,charts,data visualization,graphs,plots
6
6
  Author: Stephen Yau
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pfund-plot"
3
- version = "0.0.3"
3
+ version = "0.0.4"
4
4
  description = "A library for financial data visualization"
5
5
  license = "Apache-2.0"
6
6
  authors = [
@@ -272,6 +272,16 @@ class BasePlot:
272
272
  )
273
273
  return df
274
274
 
275
+ def _widgets_enabled(self) -> bool:
276
+ """Whether interactive widgets are active for this plot."""
277
+ from pfund_plot.config import get_config
278
+
279
+ return not (
280
+ get_config().disable_widgets
281
+ or self._control is None
282
+ or not self._control.get("widgets", True)
283
+ )
284
+
275
285
  def _create_widgets(self) -> None:
276
286
  def _has_required_cols(WidgetClass: type[BaseWidget]) -> bool:
277
287
  """Check if the df has the columns required by the widget."""
@@ -280,13 +290,7 @@ class BasePlot:
280
290
  return True
281
291
  return all(col in self._df.columns for col in required)
282
292
 
283
- from pfund_plot.config import get_config
284
-
285
- if (
286
- get_config().disable_widgets
287
- or self._control is None
288
- or not self._control.get("widgets", True)
289
- ):
293
+ if not self._widgets_enabled():
290
294
  return
291
295
 
292
296
  for WidgetClass in self._ChosenWidgetClasses:
@@ -1055,10 +1059,14 @@ class BasePlot:
1055
1059
  self._plot = self._build_plot(df=self._df)
1056
1060
 
1057
1061
  def _create_pane(self):
1062
+ # num_data is the initial value of the DatetimeRangeWidget slider, so it
1063
+ # only applies when widgets are active. With widgets disabled there is no
1064
+ # slider to reveal the rest of the data, so show the full df instead.
1058
1065
  if (
1059
1066
  self._df is not None
1060
1067
  and self._control
1061
1068
  and self._control.get("num_data") is not None
1069
+ and self._widgets_enabled()
1062
1070
  ):
1063
1071
  df = self._df.tail(self._control["num_data"])
1064
1072
  else:
File without changes