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

Tabulator : tooltips #7551

Open
symelmu opened this issue Dec 13, 2024 · 0 comments
Open

Tabulator : tooltips #7551

symelmu opened this issue Dec 13, 2024 · 0 comments

Comments

@symelmu
Copy link

symelmu commented Dec 13, 2024

Hello all,

ALL software version info

MacOs with Chrome, Safari or FireFox
bokeh 3.6.1 and panel >= 1.5.2

Description of expected behavior and the observed behavior

The issue occurs in Tabulator when using header_tooltips with a FastListTemplate. The background and font colors of the tooltips are both dark, making the text unreadable.

I couldn't find the CSS responsible for the background color.

Complete, minimal, self-contained example code that reproduces the issue

import pandas as pd
import panel as pn
import random
import numpy as np

pn.extension('tabulator')

n = 100
data = {
    "ID": range(1, n + 1),  
    "Name": [f"Name_{i}" for i in range(1, n + 1)],  
    "Age": [random.randint(18, 70) for _ in range(n)],  
    "Score": [round(random.uniform(50, 100), 2) for _ in range(n)], 
    "Category": [random.choice(["A", "B", "C"]) for _ in range(n)], 
    "Active": [random.choice([True, False]) for _ in range(n)], 
    "Date": pd.date_range("2023-01-01", periods=n), 
    "Comment": [f"Comment_{i}" for i in range(1, n + 1)], 
    "Rating": [round(random.uniform(1, 5), 1) for _ in range(n)], 
    "Value": np.random.randint(100, 500, size=n)}
df = pd.DataFrame(data)

htt = {x: x for x in data.keys()}

tabulator = pn.widgets.Tabulator(df, page_size=10, sizing_mode='stretch_width', header_tooltips=htt)
# app = tabulator  # OK

template = pn.template.FastListTemplate(title="Tabulator test", main=[tabulator])  # bug 

# template = pn.template.BootstrapTemplate(title="Tabulator test", main=[tabulator])  # OK
# template = pn.template.MaterialTemplate(title="Tabulator test", main=[tabulator])  # OK
# template = pn.template.MaterialTemplate(title="Tabulator test", main=[tabulator])  # OK

app = template

app.servable()  
app.show() 

Screenshots or screencasts of the bug in action

Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant