☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

DataTable Column formatting not updating on data change

Community Support
SubhamSharma1996
SubhamSharma1996

I have a data table on which i have specified conditional formatting in a specific column. When the Dashboard is loaded the formatting is working absolutely fine.
But i have another datatable whose value on selected drive changes in the datatable having conditionally colored column.
The data is changing but the color/formatting isn’t getting changed.
How to overcome this?
Help, please.

⌁   Link to post
SubhamSharma1996
SubhamSharma1996

I have two Datatable A and B. The Data in B is derived when i click on the rows in A which i am doing using CustomJS callaback.
I have specified red green colors in one of the column in DataTable B(by checking >0 and <0 value) using HTMLTemplateFormatter.

Now when the Dashboard is loaded the color as per value of column is coming correct for initial view
But when data in Table B is changed as i click on rows in Table A the color is not updating.

⌁   Link to post
p-himik
p-himik

Answering this question without an example will make me spend way too much time. If you want help, please provide an example where the only thing that doesn’t work is exactly the thing that you want to be fixed.

⌁   Link to post
SubhamSharma1996
SubhamSharma1996

templatecolor = “”"


<%= value %>
<%=
(function symbolfromint(){
if (change > 0)
{return(’ &#8679’)}
else if (change < 0)
{return(’ &#8681’)}
}()) %>

“”"
formatter = HTMLTemplateFormatter(template=templatecolor)

    columns = [
        TableColumn(field="lista", title="A "),
        TableColumn(field="listb", title="B"),
        TableColumn(field="listc", title="C"),
        TableColumn(field="listd", title="D", formatter=formatter),
        TableColumn(field="liste", title="E"),
    ]
⌁   Link to post
SubhamSharma1996
SubhamSharma1996

How to dynamically refresh the format when data changes in datasource of table on click .
I have written a callback in CustomJS with source.change.emit(); which is changing the data in the columns but the conditional fromatting of column ‘D’ stays fixed with the intial color set on the column values when dashboard is loaded or opened

⌁   Link to post
Bryan
Bryan

@SubhamSharma1996 This forum is an all-volunteer effort, and participants are in timezones all over the world. There is no need to poke a thread less than two hours later. As gently as I can suggest this: there is no SLA here, and you should re-calibrate your expectations. Many interactions here may span days, as people are only able to respond in between other work and life priorities.

⌁   Link to post
Bryan
Bryan

@SubhamSharma1996 No apologies needed, I just want to make sure expectations are in line with what’s possible. As @p-himik mentioned above, what would really help is for you to supply some minimal, complete code to start from. Asking other people to try and help without that context always risks misunderstanding, and in particular risks that time and effort is spent, only to solve the wrong problem. With so many help requests, that risk adds big disincentive to prioritizing vs other questions (just being completely up front)

⌁   Link to post
p-himik
p-himik

You don’t need to post the full code created on behalf of your organization.

What’s need is a very small and runnable example that I can just copy and run without modifying it. So it has to include even the imports.
If such an example can be very small, then you will have no problems in creating it in your spare time, thus making the organizational restrictions irrelevant.
If such an example is required to be pretty big, then I cannot possibly recreate it myself relying just on the isolated code blocks above.

⌁   Link to post

End of archived discussion · Replies are disabled