Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HoloViews Pane does not keep Dark theme after update #1764

Closed
MarcSkovMadsen opened this issue Nov 11, 2020 · 0 comments · Fixed by #1767
Closed

HoloViews Pane does not keep Dark theme after update #1764

MarcSkovMadsen opened this issue Nov 11, 2020 · 0 comments · Fixed by #1767
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Nov 11, 2020

Panel 0.10.1

While working on Streaming Apps I discovered that the HoloViews Pane becomes light themed if you update it while using the ReactTemplate Dark Theme.

My guess is that the problem is there across templates and non-default themes.

Solution

Fix this :-)

Screenshots

Initially it looks fine

image

But after clicking the EMIT button it looks like

image

Reproducible example

import numpy as np
import pandas as pd
import panel as pn
import hvplot.pandas

hvplot_pane = pn.pane.HoloViews(sizing_mode="stretch_both")

def update_hvplot(data):
    data = pd.concat(data).reset_index()
    plot = data.hvplot(y="y")
    hvplot_pane.object = plot

def emit(*args):
    data=[pd.DataFrame({"y": [np.random.randn()]}, index=pd.DatetimeIndex([pd.datetime.now()])) for i in range(0,50)]
    update_hvplot(data)
emit()

emit_button = pn.widgets.Button(name="EMIT")
emit_button.on_click(emit)

layout = pn.template.ReactTemplate(
    site="Awesome Panel",
    title="HoloViews",
    theme=pn.template.react.DarkTheme,
    row_height=200,
)
layout.main[0:2, 0:12] = hvplot_pane
layout.main[2:3, 0:12]=pn.Row(emit_button, sizing_mode="stretch_width")
layout.servable()
@MarcSkovMadsen MarcSkovMadsen added the TRIAGE Default label for untriaged issues label Nov 11, 2020
@philippjfr philippjfr added type: bug Something isn't correct or isn't working and removed TRIAGE Default label for untriaged issues labels Nov 11, 2020
@philippjfr philippjfr added this to the v0.10.2 milestone Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants