Skip to content

Commit ad990ac

Browse files
committed
update demo
1 parent 4c099b6 commit ad990ac

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

chartlets.py/demo/my_extension/my_panel_1.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import Any
22
import altair as alt
33
from chartlets import Component, Input, Output, State
4-
from chartlets.components import VegaChart, Box, Select
4+
from chartlets.components import VegaChart, Box, Select, Skeleton
55

66
from server.context import Context
77
from server.panel import Panel
@@ -13,8 +13,12 @@
1313
@panel.layout()
1414
def render_panel(ctx: Context) -> Component:
1515
selected_dataset: int = 0
16+
chart_skeleton = Skeleton(height="100px", variant="rounded", animation="wave")
1617
chart = VegaChart(
17-
id="chart", chart=make_chart(ctx, selected_dataset), style={"flexGrow": 1}
18+
id="chart",
19+
chart=make_chart(ctx, selected_dataset),
20+
style={"flexGrow": 1},
21+
skeletonProps=chart_skeleton.to_dict(),
1822
)
1923
select = Select(
2024
id="selected_dataset",

0 commit comments

Comments
 (0)