panel icon indicating copy to clipboard operation
panel copied to clipboard

Cannot style map a hierarchical Tabulator

Open CTPassion opened this issue 2 years ago • 0 comments

ALL software version info

panel 1.3.2 python 3.11.4

Description of expected behavior and the observed behavior

Expected: The style.map method applies in exactly the same way that it does to a tabulator when Hierarchical=False.

image

Observed: The map method does not style the table cells when Hierarchical=True.

image

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

import bokeh
import panel as pn
import pandas as pd

bokeh.sampledata.download()

df = pd.read_csv("C:\\Users\\J01024\\.bokeh\\data\\routes.csv")

df = df.set_index(['Airline', 'Source'])

table = pn.widgets.Tabulator(value=df, hierarchical=True, height=200)

table.style.map(lambda x: "background-color: red;")

table.show()
  • [ ] I may be interested in making a pull request to address this

If someone could point me in the right direction I might address it myself.

CTPassion avatar Nov 29 '23 13:11 CTPassion