qgrid icon indicating copy to clipboard operation
qgrid copied to clipboard

Add color to grid cells

Open den-run-ai opened this issue 10 years ago • 7 comments

Is it possible to add color to grid cells?

den-run-ai avatar Aug 28 '15 03:08 den-run-ai

Not right now, sorry. Are you looking to manually set the color of a single cell? Or would you want the color to change automatically based on a condition, like "if value < 0, make the cell red"?

TimShawver avatar Aug 31 '15 02:08 TimShawver

Based on condition, programmatically

On Sun, Aug 30, 2015, 9:56 PM Tim Shawver [email protected] wrote:

Not right now, sorry. Are you looking to manually set the color of a single cell? Or would you want the color to change automatically based on a condition, like "if value < 0, make the cell red"?

— Reply to this email directly or view it on GitHub https://github.com/quantopian/qgrid/issues/28#issuecomment-136239595.

den-run-ai avatar Aug 31 '15 03:08 den-run-ai

Same for me, currently I apply something along the lines

df.style.\
        applymap(color_dateofbirth, subset=['dateofbirth']).\
        applymap(color_sex, subset=['sex'])

which results in the error: TraitError: The 'df' trait of a QgridWidget instance must be a DataFrame, but a value of class 'pandas.io.formats.style.Styler' (i.e. <pandas.io.formats.style.Styler object at 0x7fbcb87b4e48>) was specified.

Wursthub avatar Oct 23 '17 15:10 Wursthub

@TimShawver Any advancement on this - it will be really helpful?

jaladh-singhal avatar May 06 '20 13:05 jaladh-singhal

+1 if we could apply the color based on the column would be helpful.

    df.style.applymap()  returns Styler obj

qgrid is expecting a dataframe obj.

anandsimer avatar May 31 '20 23:05 anandsimer

+1 ...also coloring the toolbar would be awesome, now in JL dark theme it doesn't look that nice...

image

LukaPitamic avatar Sep 04 '20 16:09 LukaPitamic

Hello, any news regarding this?

jonsnowseven avatar Jan 11 '21 14:01 jonsnowseven