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.
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/PKG-INFO +1 -1
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/pyproject.toml +1 -1
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/plot.py +15 -7
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/README.md +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/__init__.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/__main__.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/cli/__init__.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/cli/commands/gallery/__init__.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/cli/commands/gallery/gallery_marimo.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/cli/commands/serve.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/cli/main.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/config.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/enums/__init__.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/enums/dataframe_backend.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/enums/display_mode.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/enums/panel_design.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/enums/panel_theme.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/enums/plotting_backend.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/js_tap/components/candlestick.js +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/mixins/streaming_market_feed_mixin.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/altair.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/area/__init__.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/area/bokeh.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/bar/__init__.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/bar/bokeh.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/bokeh.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/candlestick/__init__.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/candlestick/bokeh.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/candlestick/svelte.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/holoviews.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/label/__init__.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/label/bokeh.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/layout/__init__.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/layout/layout.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/layout/panel.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/layout/tabs/__init__.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/layout/tabs/panel.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/lazy.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/line/__init__.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/line/bokeh.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/matplotlib.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/plotly.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/scatter/__init__.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/scatter/bokeh.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/scatter/marker.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/plots/ta.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/renderers/base.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/renderers/browser.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/renderers/desktop.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/renderers/notebook.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/typing.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/utils/__init__.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/utils/bokeh.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/widgets/base.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/widgets/datetime_widget.py +0 -0
- {pfund_plot-0.0.3 → pfund_plot-0.0.4}/src/pfund_plot/widgets/ticker_widget.py +0 -0
|
@@ -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
|
-
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|