supervisely 6.73.266__py3-none-any.whl → 6.73.267__py3-none-any.whl
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.
Potentially problematic release.
This version of supervisely might be problematic. Click here for more details.
- supervisely/app/widgets/bokeh/bokeh.py +51 -17
- {supervisely-6.73.266.dist-info → supervisely-6.73.267.dist-info}/METADATA +1 -1
- {supervisely-6.73.266.dist-info → supervisely-6.73.267.dist-info}/RECORD +7 -7
- {supervisely-6.73.266.dist-info → supervisely-6.73.267.dist-info}/LICENSE +0 -0
- {supervisely-6.73.266.dist-info → supervisely-6.73.267.dist-info}/WHEEL +0 -0
- {supervisely-6.73.266.dist-info → supervisely-6.73.267.dist-info}/entry_points.txt +0 -0
- {supervisely-6.73.266.dist-info → supervisely-6.73.267.dist-info}/top_level.txt +0 -0
|
@@ -244,29 +244,22 @@ class Bokeh(Widget):
|
|
|
244
244
|
if bokeh.__version__ != "3.1.1":
|
|
245
245
|
raise RuntimeError(f"Bokeh version {bokeh.__version__} is not supported. Use 3.1.1")
|
|
246
246
|
|
|
247
|
-
from bokeh.models import Legend # pylint: disable=import-error
|
|
248
|
-
from bokeh.plotting import figure # pylint: disable=import-error
|
|
249
|
-
|
|
250
247
|
self.widget_id = widget_id
|
|
251
248
|
self._plots = plots
|
|
252
|
-
self._plot = figure(width=width, height=height, tools=tools, toolbar_location="above")
|
|
253
249
|
|
|
250
|
+
self._width = width
|
|
251
|
+
self._height = height
|
|
252
|
+
self._tools = tools
|
|
253
|
+
self._toolbar_location = toolbar_location
|
|
254
|
+
self._x_axis_visible = x_axis_visible
|
|
255
|
+
self._y_axis_visible = y_axis_visible
|
|
256
|
+
self._grid_visible = grid_visible
|
|
257
|
+
self._show_legend = show_legend
|
|
254
258
|
self._legend_location = legend_location
|
|
255
259
|
self._legend_click_policy = legend_click_policy
|
|
256
|
-
if show_legend:
|
|
257
|
-
self._plot.add_layout(
|
|
258
|
-
Legend(click_policy=self._legend_click_policy),
|
|
259
|
-
self._legend_location,
|
|
260
|
-
)
|
|
261
|
-
self._renderers = []
|
|
262
260
|
|
|
263
|
-
self._plot.xaxis.visible = x_axis_visible
|
|
264
|
-
self._plot.yaxis.visible = y_axis_visible
|
|
265
|
-
self._plot.grid.visible = grid_visible
|
|
266
261
|
super().__init__(widget_id=widget_id, file_path=__file__)
|
|
267
|
-
|
|
268
|
-
self._process_plots(plots)
|
|
269
|
-
self._update_html()
|
|
262
|
+
self._load_chart()
|
|
270
263
|
|
|
271
264
|
server = self._sly_app.get_server()
|
|
272
265
|
|
|
@@ -277,6 +270,42 @@ class Bokeh(Widget):
|
|
|
277
270
|
# TODO: support for offline mode
|
|
278
271
|
# JinjaWidgets().context.pop(self.widget_id, None) # remove the widget from index.html
|
|
279
272
|
|
|
273
|
+
def _load_chart(self, **kwargs):
|
|
274
|
+
from bokeh.models import Legend # pylint: disable=import-error
|
|
275
|
+
from bokeh.plotting import figure # pylint: disable=import-error
|
|
276
|
+
|
|
277
|
+
self._width = kwargs.get("width", self._width)
|
|
278
|
+
self._height = kwargs.get("height", self._height)
|
|
279
|
+
self._tools = kwargs.get("tools", self._tools)
|
|
280
|
+
self._toolbar_location = kwargs.get("toolbar_location", self._toolbar_location)
|
|
281
|
+
self._show_legend = kwargs.get("show_legend", self._show_legend)
|
|
282
|
+
self._legend_location = kwargs.get("legend_location", self._legend_location)
|
|
283
|
+
self._legend_click_policy = kwargs.get("legend_click_policy", self._legend_click_policy)
|
|
284
|
+
self._x_axis_visible = kwargs.get("x_axis_visible", self._x_axis_visible)
|
|
285
|
+
self._y_axis_visible = kwargs.get("y_axis_visible", self._y_axis_visible)
|
|
286
|
+
self._grid_visible = kwargs.get("grid_visible", self._grid_visible)
|
|
287
|
+
|
|
288
|
+
self._plot = figure(
|
|
289
|
+
width=self._width,
|
|
290
|
+
height=self._height,
|
|
291
|
+
tools=self._tools,
|
|
292
|
+
toolbar_location=self._toolbar_location,
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
if self._show_legend:
|
|
296
|
+
self._plot.add_layout(
|
|
297
|
+
Legend(click_policy=self._legend_click_policy),
|
|
298
|
+
self._legend_location,
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
self._plot.xaxis.visible = self._x_axis_visible
|
|
302
|
+
self._plot.yaxis.visible = self._y_axis_visible
|
|
303
|
+
self._plot.grid.visible = self._grid_visible
|
|
304
|
+
|
|
305
|
+
self._renderers = []
|
|
306
|
+
self._process_plots(self._plots)
|
|
307
|
+
self._update_html()
|
|
308
|
+
|
|
280
309
|
@property
|
|
281
310
|
def route_path(self) -> str:
|
|
282
311
|
return self.get_route_path(Bokeh.Routes.VALUE_CHANGED)
|
|
@@ -399,4 +428,9 @@ class Bokeh(Widget):
|
|
|
399
428
|
|
|
400
429
|
self._plots[plot_idx]._radii = new_radii
|
|
401
430
|
self._plots[plot_idx]._source.data["radius"] = new_radii
|
|
402
|
-
self.
|
|
431
|
+
self._load_chart()
|
|
432
|
+
|
|
433
|
+
def update_chart_size(self, width: Optional[int] = None, height: Optional[int] = None) -> None:
|
|
434
|
+
self._width = width or self._width
|
|
435
|
+
self._height = height or self._height
|
|
436
|
+
self._load_chart()
|
|
@@ -129,7 +129,7 @@ supervisely/app/widgets/binded_input_number/__init__.py,sha256=47DEQpj8HBSa-_TIm
|
|
|
129
129
|
supervisely/app/widgets/binded_input_number/binded_input_number.py,sha256=RXTAGaMXtGOl4pprVLyQosr61t2rI_U_U8VNHhSyBhA,6251
|
|
130
130
|
supervisely/app/widgets/binded_input_number/template.html,sha256=uCEZ54BNC2itr39wxxThXw62WlJ9659cuz8osCm0WZE,162
|
|
131
131
|
supervisely/app/widgets/bokeh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
132
|
-
supervisely/app/widgets/bokeh/bokeh.py,sha256=
|
|
132
|
+
supervisely/app/widgets/bokeh/bokeh.py,sha256=zob2F-cJ6JX_Dk2FANfN94uHDyxvgoxuBpeL0OebVyg,16128
|
|
133
133
|
supervisely/app/widgets/bokeh/template.html,sha256=ntsh7xx4q9OHG62sa_r3INDxsXgvdPFIWTtYaWn_0t8,12
|
|
134
134
|
supervisely/app/widgets/button/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
135
135
|
supervisely/app/widgets/button/button.py,sha256=zDQinhOOjNNxdP2GIFrwTmVfGAeJJoKV6CT6C8KzQNI,10405
|
|
@@ -1062,9 +1062,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
1062
1062
|
supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
|
|
1063
1063
|
supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
|
|
1064
1064
|
supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
|
|
1065
|
-
supervisely-6.73.
|
|
1066
|
-
supervisely-6.73.
|
|
1067
|
-
supervisely-6.73.
|
|
1068
|
-
supervisely-6.73.
|
|
1069
|
-
supervisely-6.73.
|
|
1070
|
-
supervisely-6.73.
|
|
1065
|
+
supervisely-6.73.267.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
1066
|
+
supervisely-6.73.267.dist-info/METADATA,sha256=TvqvMWrInseSCyvWD2sOf5_eLRMycpEQqX775mWpMos,33573
|
|
1067
|
+
supervisely-6.73.267.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
1068
|
+
supervisely-6.73.267.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
|
|
1069
|
+
supervisely-6.73.267.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
|
|
1070
|
+
supervisely-6.73.267.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|