Skip to content

Commit b8748d9

Browse files
authored
prim: Replace deprecated Altair function (#270)
* prim: Replace deprecated Altair function Replace altair.selection_single() with altair.selection_point(), since the former is deprecated in Altair 5.0.0. * prim: Fix Altair chart by using Chart().add_selection() Fix the Altair Chart used in inspect_tradeoff(), by using Chart().add_selection() instead of the removed Chart().properties(selector=). This fixed the inspect_tradeoff() when using Altair 5.0.0. * prim: Update deprecated Chart.add_selection() to .add_params() See https://altair-viz.github.io/releases/changes.html#grammar-changes
1 parent f7fe968 commit b8748d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ema_workbench/analysis/prim.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ def inspect_tradeoff(self):
560560
width = 400
561561
height = width
562562

563-
point_selector = alt.selection_single(fields=["id"])
563+
point_selector = alt.selection_point(fields=["id"])
564564

565565
peeling = self.peeling_trajectory.copy()
566566
peeling["id"] = peeling.index
@@ -583,7 +583,7 @@ def inspect_tradeoff(self):
583583
alt.Tooltip("res_dim:O"),
584584
],
585585
)
586-
.properties(selection=point_selector)
586+
.add_params(point_selector)
587587
.properties(width=width, height=height)
588588
)
589589

0 commit comments

Comments
 (0)