In the following code, I'm making the pie selection in the same cell as the pie creation, and the selection does not work. I only works when the selection is made in a separate cell.
I suspect we do not initialize the pie selection at the pie creation in the TypeScript view.
from bqplot import ColorScale, ColorAxis
from bqplot.colorschemes import CATEGORY20b
fig = plt.figure()
x = np.random.rand(5)
pie = plt.pie(x, colors=CATEGORY20b,
stroke="black", sort=True, inner_radius=100,
labels=list(string.ascii_uppercase), label_color="black", font_weight="bold",
display_values=True,
selected_style={"opacity": 1, "stroke": "white"},
unselected_style={"opacity": 0.2}
)
pie.selected = [0, 1]
fig
In the following code, I'm making the pie selection in the same cell as the pie creation, and the selection does not work. I only works when the selection is made in a separate cell.
I suspect we do not initialize the pie selection at the pie creation in the TypeScript view.