Hi, I’m trying to show a table of strings using Bokeh (I’m already using bokeh plots within a vplot+tabs, and wanted a table of data also in the vplot).
My strings are multiline via having ‘\n’ characters, but when attempting to display these within a Bokeh DataTable the line breaks are stripped (see attached screenshot) Any way to avoid this?
Just a small update - I ended up deciding to just work within the bounds and just using color to group & differentiate things.
The issue doesn’t appear to be due to bokeh, it’s more of a limitation of slickgrid - there’s some workarounds / slickgrid forks posted out there for those really looking for a solution to have multitline grids, but haven’t seen anything officially merged in.
···
On Friday, March 11, 2016 at 12:33:57 PM UTC-8, Vivek Gani wrote:
Hi, I’m trying to show a table of strings using Bokeh (I’m already using bokeh plots within a vplot+tabs, and wanted a table of data also in the vplot).
My strings are multiline via having ‘\n’ characters, but when attempting to display these within a Bokeh DataTable the line breaks are stripped (see attached screenshot) Any way to avoid this?
Sorry for the slow response, I was going to say I think it is a SlickGrid limitation which is unfortunate. If you do (or did) find anything that seems like it might be a useful or workable workaround (or even a modification we could make to our vendored version of slickgrid) please don't hesitate to open a GH issue.
Just a small update - I ended up deciding to just work within the bounds and just using color to group & differentiate things.
The issue doesn't appear to be due to bokeh, it's more of a limitation of slickgrid - there's some workarounds / slickgrid forks posted out there for those really looking for a solution to have multitline grids, but haven't seen anything officially merged in.
On Friday, March 11, 2016 at 12:33:57 PM UTC-8, Vivek Gani wrote:
Hi, I'm trying to show a table of strings using Bokeh (I'm already using bokeh plots within a vplot+tabs, and wanted a table of data also in the vplot).
My strings are multiline via having '\n' characters, but when attempting to display these within a Bokeh DataTable the line breaks are stripped (see attached screenshot) Any way to avoid this?
You can supply a template that is any HTML as a template with slots for the values. An example from the docstring:
HTMLTemplateFormatter(template=‘<%= value %>’)
You could try a pre tag to preserved the newlines.
Let me know how that goes. I added the HTMLTeamplateFormatter in order to support links and images in a DataTable, but it should work for arbitrary HTML formatting.
cheers,
Dennis
···
On Sat, Mar 12, 2016 at 12:15 PM Bryan Van de Ven [email protected] wrote:
Sorry for the slow response, I was going to say I think it is a SlickGrid limitation which is unfortunate. If you do (or did) find anything that seems like it might be a useful or workable workaround (or even a modification we could make to our vendored version of slickgrid) please don’t hesitate to open a GH issue.
Just a small update - I ended up deciding to just work within the bounds and just using color to group & differentiate things.
The issue doesn’t appear to be due to bokeh, it’s more of a limitation of slickgrid - there’s some workarounds / slickgrid forks posted out there for those really looking for a solution to have multitline grids, but haven’t seen anything officially merged in.
On Friday, March 11, 2016 at 12:33:57 PM UTC-8, Vivek Gani wrote:
Hi, I’m trying to show a table of strings using Bokeh (I’m already using bokeh plots within a vplot+tabs, and wanted a table of data also in the vplot).
My strings are multiline via having ‘\n’ characters, but when attempting to display these within a Bokeh DataTable the line breaks are stripped (see attached screenshot) Any way to avoid this?
From what I understand, slickgrid does not plan on supporting variable or dynamic row heights. There are a few forks that do, but there are questions about performance, quality of implementation, and maintenance of these.
cheers,
Dennis
···
On Sun, Mar 13, 2016 at 11:14 AM Dennis O’Brien [email protected] wrote:
You can supply a template that is any HTML as a template with slots for the values. An example from the docstring:
HTMLTemplateFormatter(template=‘<%= value %>’)
You could try a pre tag to preserved the newlines.
Let me know how that goes. I added the HTMLTeamplateFormatter in order to support links and images in a DataTable, but it should work for arbitrary HTML formatting.
cheers,
Dennis
On Sat, Mar 12, 2016 at 12:15 PM Bryan Van de Ven [email protected] wrote:
Sorry for the slow response, I was going to say I think it is a SlickGrid limitation which is unfortunate. If you do (or did) find anything that seems like it might be a useful or workable workaround (or even a modification we could make to our vendored version of slickgrid) please don’t hesitate to open a GH issue.
Just a small update - I ended up deciding to just work within the bounds and just using color to group & differentiate things.
The issue doesn’t appear to be due to bokeh, it’s more of a limitation of slickgrid - there’s some workarounds / slickgrid forks posted out there for those really looking for a solution to have multitline grids, but haven’t seen anything officially merged in.
On Friday, March 11, 2016 at 12:33:57 PM UTC-8, Vivek Gani wrote:
Hi, I’m trying to show a table of strings using Bokeh (I’m already using bokeh plots within a vplot+tabs, and wanted a table of data also in the vplot).
My strings are multiline via having ‘\n’ characters, but when attempting to display these within a Bokeh DataTable the line breaks are stripped (see attached screenshot) Any way to avoid this?
Yeah, slickgrid does some interesting things where it defines the offset for the subsequent rows (e.g. a second row has an offset of 25px, but it’d be something higher depending on the maximum number of lines evaluated on all the columns in the row above.). From my understanding it means supporting multiline could require some degree of precalculation aside from some other CSS hacks I saw.
···
On Sunday, March 13, 2016 at 2:17:13 PM UTC-7, Dennis O’Brien wrote:
From what I understand, slickgrid does not plan on supporting variable or dynamic row heights. There are a few forks that do, but there are questions about performance, quality of implementation, and maintenance of these.
cheers,
Dennis
On Sun, Mar 13, 2016 at 11:14 AM Dennis O’Brien [email protected] wrote:
You can supply a template that is any HTML as a template with slots for the values. An example from the docstring:
HTMLTemplateFormatter(template=‘<%= value %>’)
You could try a pre tag to preserved the newlines.
Let me know how that goes. I added the HTMLTeamplateFormatter in order to support links and images in a DataTable, but it should work for arbitrary HTML formatting.
cheers,
Dennis
On Sat, Mar 12, 2016 at 12:15 PM Bryan Van de Ven [email protected] wrote:
Sorry for the slow response, I was going to say I think it is a SlickGrid limitation which is unfortunate. If you do (or did) find anything that seems like it might be a useful or workable workaround (or even a modification we could make to our vendored version of slickgrid) please don’t hesitate to open a GH issue.
Just a small update - I ended up deciding to just work within the bounds and just using color to group & differentiate things.
The issue doesn’t appear to be due to bokeh, it’s more of a limitation of slickgrid - there’s some workarounds / slickgrid forks posted out there for those really looking for a solution to have multitline grids, but haven’t seen anything officially merged in.
On Friday, March 11, 2016 at 12:33:57 PM UTC-8, Vivek Gani wrote:
Hi, I’m trying to show a table of strings using Bokeh (I’m already using bokeh plots within a vplot+tabs, and wanted a table of data also in the vplot).
My strings are multiline via having ‘\n’ characters, but when attempting to display these within a Bokeh DataTable the line breaks are stripped (see attached screenshot) Any way to avoid this?