N = 1000000
selected = solara.reactive([5,10,25])
x = np.random.randn(N)
y = np.random.randn(N)
def rand_sel():
selected.set(np.random.randint(0,N,size=50))
@solara.component
def Page():
fig = go.FigureWidget(
data=go.Scattergl(
x = x,
y = y,
mode='markers',
selected=go.scattergl.Selected(marker = {"color":"red", "size":25}),
selectedpoints=selected.value
)
)
solara.FigurePlotly(fig)
solara.Button('Random select', on_click=rand_sel)
Page()
N = 1000000
selected = solara.reactive([5,10,25])
x = np.random.randn(N)
y = np.random.randn(N)
def rand_sel():
selected.set(np.random.randint(0,N,size=50))
@solara.component
def Page():
fig = go.FigureWidget(
data=go.Scattergl(
x = x,
y = y,
mode='markers',
selected=go.scattergl.Selected(marker = {"color":"red", "size":25}),
selectedpoints=selected.value
)
)
solara.FigurePlotly(fig)
solara.Button('Random select', on_click=rand_sel)
Page()