Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
clarasb committed Jan 27, 2025
1 parent 0ca6420 commit 1b1a64d
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions examples/serve/panels-demo/my_viewer_ext/my_panel_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@

from chartlets import Component, Input, State, Output, Container

from chartlets.components import Box, Button, Typography, Plot, Select # VegaChart

# from chartlets.components import Box, Button, Typography, Select, VegaChart
# from chartlets.components import Box, Button, Typography, Plot, Select # VegaChart
from chartlets.components import Box, Button, Typography, Select, VegaChart

from xcube.webapi.viewer.contrib import Panel, get_dataset
from xcube.server.api import Context
Expand All @@ -32,13 +31,13 @@ def render_panel(
theme_mode: str,
) -> Component:

if theme_mode == "dark":
alt.theme.enable(name=theme_mode)
else:
alt.theme.enable(name="default") # in viewer: light
# if theme_mode == "dark":
# alt.theme.enable(name=theme_mode)
# else:
# alt.theme.enable(name="default") # in viewer: light

plot = Plot(id="plot", chart=None, style={"flexGrow": 3}) # , theme="dark")
# plot = VegaChart(id="plot", chart=None, style={"flexGrow": 3}, theme="dark")
# plot = Plot(id="plot", chart=None, style={"flexGrow": 3}) # , theme="dark")
plot = VegaChart(id="plot", chart=None, style={"flexGrow": 3}, theme="dark")

text = f"{dataset_id} " f"/ {time_label[0:-1]}"

Expand Down

0 comments on commit 1b1a64d

Please sign in to comment.