Responsive Table inside Widget Box?

Hi all,

For some time now (last 2 releases at least) I have not been able to get the Bokeh tables to resize when they are contained inside a Widget box and have the resize mode set.

Is this a known problem that this hasnt been implemented or is it a bug? I think it should be resizeable if it is set inside the widgetbox settings.

Cheers,

Corey

Hi,

I can't say offhand if this is a bug or a usage change. What would be most valuable is a minimal complete code example that demonstrates what you are seeing.

Thanks,

Bryan

···

On Jan 9, 2018, at 04:08, 'omearac' via Bokeh Discussion - Public <[email protected]> wrote:

Hi all,

For some time now (last 2 releases at least) I have not been able to get the Bokeh tables to resize when they are contained inside a Widget box and have the resize mode set.

Is this a known problem that this hasnt been implemented or is it a bug? I think it should be resizeable if it is set inside the widgetbox settings.

Cheers,
Corey

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/9ade2898-9100-4fef-93fd-20137b8b2d69%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hi Bryan,

Here is a small example - when the window is full screen, the table should expand to fit the whole browser window.

By inspecting, we see that the widget box resizes, but the bk-data-table element has a huge right margin.

Even by manually changing the CSS, that only changes the right scroll bar, so we also have to manually change CSS for the slick-header div and then column sizes…etc.

Thanks,

Corey

from bokeh.plotting import show

from bokeh.layouts import widgetbox

from bokeh.models.sources import ColumnDataSource

from bokeh.models.widgets import DataTable, TableColumn

from datetime import date

from random import randint

#Create Column Data Source

data_for_table = dict(

hp_count=[randint(0, 10) for i in range(30)],

lp_count=[randint(0, 20) for i in range(30)],

nom_count=[randint(60, 70) for i in range(30)],

)

source = ColumnDataSource(data_for_table)

#Create Table Columns

columns = [

TableColumn(field=“hp_count”, title=“Data 1”),

TableColumn(field=“lp_count”, title=“Data 2”),

TableColumn(field=“nom_count”, title=“Data 3”),

]

#Create Bokeh DataTable

data_table = DataTable(source=source, columns=columns, selectable=True,

scroll_to_selection=False)

show(widgetbox(data_table, sizing_mode=‘stretch_both’))

``

···

On Tuesday, January 9, 2018 at 2:55:38 PM UTC+1, Bryan Van de ven wrote:

Hi,

I can’t say offhand if this is a bug or a usage change. What would be most valuable is a minimal complete code example that demonstrates what you are seeing.

Thanks,

Bryan

On Jan 9, 2018, at 04:08, ‘omearac’ via Bokeh Discussion - Public [email protected] wrote:

Hi all,

For some time now (last 2 releases at least) I have not been able to get the Bokeh tables to resize when they are contained inside a Widget box and have the resize mode set.

Is this a known problem that this hasnt been implemented or is it a bug? I think it should be resizeable if it is set inside the widgetbox settings.

Cheers,

Corey


You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/9ade2898-9100-4fef-93fd-20137b8b2d69%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.