Last row in a DataTable

Hi,

I’ve modified the sample code in the User Guide for Data Tables and I am unable to see the last row. Is there a setting that I’m missing or am I doing something else wrong?

Code below:

from datetime import date

from random import randint

from bokeh.io import output_file, show

from bokeh.layouts import widgetbox

from bokeh.models import ColumnDataSource

from bokeh.models.widgets import DataTable, DateFormatter, TableColumn

output_file(“data_table.html”)

data = dict(

dates=[date(2014+i, 3, 1) for i in range(100)],

downloads=[randint(0, 100) for i in range(100)],

)

source = ColumnDataSource(data)

columns = [

TableColumn(field=“dates”, title=“Date”, formatter=DateFormatter()),

TableColumn(field=“downloads”, title=“Downloads”),

]

data_table = DataTable(source=source, columns=columns, width=400, height=280)

show(widgetbox(data_table))

Regards,

Foo

Hi,

I believe this was fixed recently and the fix will be in the next release. When I run your code on master, I see the expected last row 99 (since range(100) stops at 99).

Thanks,

Bryan

···

On Nov 5, 2017, at 17:15, [email protected] wrote:

Hi,

I've modified the sample code in the User Guide for Data Tables and I am unable to see the last row. Is there a setting that I'm missing or am I doing something else wrong?

Code below:

from datetime import date
from random import randint

from bokeh.io import output_file, show
from bokeh.layouts import widgetbox
from bokeh.models import ColumnDataSource
from bokeh.models.widgets import DataTable, DateFormatter, TableColumn

output_file("data_table.html")

data = dict(
        dates=[date(2014+i, 3, 1) for i in range(100)],
        downloads=[randint(0, 100) for i in range(100)],
    )
source = ColumnDataSource(data)

columns = [
        TableColumn(field="dates", title="Date", formatter=DateFormatter()),
        TableColumn(field="downloads", title="Downloads"),
    ]
data_table = DataTable(source=source, columns=columns, width=400, height=280)

show(widgetbox(data_table))

Regards,
Foo

--
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/b564310b-7e6d-4180-bb47-d4fd0af1bccb%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Thanks Bryan. That’s very helpful.

Can you also help me with another question? I have created a button that doubles the dimension of a table (rows and columns). When this happens, the columns update but the number of rows stays the same. Am I missing something? I have the following code:

source = ColumnDataSource(data)

columns_table = [TableColumn(field=col, title=col) for col in df.columns]

data_table = DataTable(source=source, columns=columns_table, width=1500, fit_columns = False, row_headers = False)

···

On Tuesday, 7 November 2017 22:26:52 UTC, Bryan Van de ven wrote:

Hi,

I believe this was fixed recently and the fix will be in the next release. When I run your code on master, I see the expected last row 99 (since range(100) stops at 99).

Thanks,

Bryan

On Nov 5, 2017, at 17:15, [email protected] wrote:

Hi,

I’ve modified the sample code in the User Guide for Data Tables and I am unable to see the last row. Is there a setting that I’m missing or am I doing something else wrong?

Code below:

from datetime import date

from random import randint

from bokeh.io import output_file, show

from bokeh.layouts import widgetbox

from bokeh.models import ColumnDataSource

from bokeh.models.widgets import DataTable, DateFormatter, TableColumn

output_file(“data_table.html”)

data = dict(

    dates=[date(2014+i, 3, 1) for i in range(100)],
    downloads=[randint(0, 100) for i in range(100)],
)

source = ColumnDataSource(data)

columns = [

    TableColumn(field="dates", title="Date", formatter=DateFormatter()),
    TableColumn(field="downloads", title="Downloads"),
]

data_table = DataTable(source=source, columns=columns, width=400, height=280)

show(widgetbox(data_table))

Regards,

Foo


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/b564310b-7e6d-4180-bb47-d4fd0af1bccb%40continuum.io.

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

This may also be a recently fixed bug, please try the latest developer build (out today) with your complete code, and report back:

  <no title> — Bokeh 3.3.2 Documentation

Thanks,

Bryan

···

On Nov 7, 2017, at 18:12, Foo <[email protected]> wrote:

Thanks Bryan. That's very helpful.

Can you also help me with another question? I have created a button that doubles the dimension of a table (rows and columns). When this happens, the columns update but the number of rows stays the same. Am I missing something? I have the following code:

source = ColumnDataSource(data)

columns_table = [TableColumn(field=col, title=col) for col in df.columns]
data_table = DataTable(source=source, columns=columns_table, width=1500, fit_columns = False, row_headers = False)

On Tuesday, 7 November 2017 22:26:52 UTC, Bryan Van de ven wrote:
Hi,

I believe this was fixed recently and the fix will be in the next release. When I run your code on master, I see the expected last row 99 (since range(100) stops at 99).

Thanks,

Bryan

> On Nov 5, 2017, at 17:15, pus...@gmail.com wrote:
>
> Hi,
>
> I've modified the sample code in the User Guide for Data Tables and I am unable to see the last row. Is there a setting that I'm missing or am I doing something else wrong?
>
> Code below:
>
> from datetime import date
> from random import randint
>
> from bokeh.io import output_file, show
> from bokeh.layouts import widgetbox
> from bokeh.models import ColumnDataSource
> from bokeh.models.widgets import DataTable, DateFormatter, TableColumn
>
> output_file("data_table.html")
>
> data = dict(
> dates=[date(2014+i, 3, 1) for i in range(100)],
> downloads=[randint(0, 100) for i in range(100)],
> )
> source = ColumnDataSource(data)
>
> columns = [
> TableColumn(field="dates", title="Date", formatter=DateFormatter()),
> TableColumn(field="downloads", title="Downloads"),
> ]
> data_table = DataTable(source=source, columns=columns, width=400, height=280)
>
> show(widgetbox(data_table))
>
> Regards,
> Foo
>
> --
> 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 bokeh+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/b564310b-7e6d-4180-bb47-d4fd0af1bccb%40continuum.io\.
> For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

--
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/1a719860-7ca3-4aa8-933e-298e1aa13699%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

I’ve installed the dev .11 version and it still has the same issues.

···

On Wednesday, 8 November 2017 00:17:45 UTC, Bryan Van de ven wrote:

This may also be a recently fixed bug, please try the latest developer build (out today) with your complete code, and report back:

    [http://bokeh.pydata.org/en/latest/docs/installation.html#developer-builds](http://bokeh.pydata.org/en/latest/docs/installation.html#developer-builds)

Thanks,

Bryan

On Nov 7, 2017, at 18:12, Foo [email protected] wrote:

Thanks Bryan. That’s very helpful.

Can you also help me with another question? I have created a button that doubles the dimension of a table (rows and columns). When this happens, the columns update but the number of rows stays the same. Am I missing something? I have the following code:

source = ColumnDataSource(data)

columns_table = [TableColumn(field=col, title=col) for col in df.columns]

data_table = DataTable(source=source, columns=columns_table, width=1500, fit_columns = False, row_headers = False)

On Tuesday, 7 November 2017 22:26:52 UTC, Bryan Van de ven wrote:

Hi,

I believe this was fixed recently and the fix will be in the next release. When I run your code on master, I see the expected last row 99 (since range(100) stops at 99).

Thanks,

Bryan

On Nov 5, 2017, at 17:15, [email protected] wrote:

Hi,

I’ve modified the sample code in the User Guide for Data Tables and I am unable to see the last row. Is there a setting that I’m missing or am I doing something else wrong?

Code below:

from datetime import date
from random import randint

from bokeh.io import output_file, show
from bokeh.layouts import widgetbox
from bokeh.models import ColumnDataSource
from bokeh.models.widgets import DataTable, DateFormatter, TableColumn

output_file(“data_table.html”)

data = dict(
dates=[date(2014+i, 3, 1) for i in range(100)],
downloads=[randint(0, 100) for i in range(100)],
)
source = ColumnDataSource(data)

columns = [
TableColumn(field=“dates”, title=“Date”, formatter=DateFormatter()),
TableColumn(field=“downloads”, title=“Downloads”),
]
data_table = DataTable(source=source, columns=columns, width=400, height=280)

show(widgetbox(data_table))

Regards,
Foo


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/b564310b-7e6d-4180-bb47-d4fd0af1bccb%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.


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/1a719860-7ca3-4aa8-933e-298e1aa13699%40continuum.io.

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

There was an untriaged issue for this, you can follow it now for updates:

  DataTable automatically scrolls down when app loads · Issue #7139 · bokeh/bokeh · GitHub

Thanks,

Bryan

···

On Nov 8, 2017, at 16:41, Foo <[email protected]> wrote:

I've installed the dev .11 version and it still has the same issues.

On Wednesday, 8 November 2017 00:17:45 UTC, Bryan Van de ven wrote:
This may also be a recently fixed bug, please try the latest developer build (out today) with your complete code, and report back:

        <no title> — Bokeh 3.3.2 Documentation

Thanks,

Bryan

> On Nov 7, 2017, at 18:12, Foo <[email protected]> wrote:
>
> Thanks Bryan. That's very helpful.
>
> Can you also help me with another question? I have created a button that doubles the dimension of a table (rows and columns). When this happens, the columns update but the number of rows stays the same. Am I missing something? I have the following code:
>
> source = ColumnDataSource(data)
>
> columns_table = [TableColumn(field=col, title=col) for col in df.columns]
> data_table = DataTable(source=source, columns=columns_table, width=1500, fit_columns = False, row_headers = False)
>
>
> On Tuesday, 7 November 2017 22:26:52 UTC, Bryan Van de ven wrote:
> Hi,
>
> I believe this was fixed recently and the fix will be in the next release. When I run your code on master, I see the expected last row 99 (since range(100) stops at 99).
>
> Thanks,
>
> Bryan
>
> > On Nov 5, 2017, at 17:15, pus...@gmail.com wrote:
> >
> > Hi,
> >
> > I've modified the sample code in the User Guide for Data Tables and I am unable to see the last row. Is there a setting that I'm missing or am I doing something else wrong?
> >
> > Code below:
> >
> > from datetime import date
> > from random import randint
> >
> > from bokeh.io import output_file, show
> > from bokeh.layouts import widgetbox
> > from bokeh.models import ColumnDataSource
> > from bokeh.models.widgets import DataTable, DateFormatter, TableColumn
> >
> > output_file("data_table.html")
> >
> > data = dict(
> > dates=[date(2014+i, 3, 1) for i in range(100)],
> > downloads=[randint(0, 100) for i in range(100)],
> > )
> > source = ColumnDataSource(data)
> >
> > columns = [
> > TableColumn(field="dates", title="Date", formatter=DateFormatter()),
> > TableColumn(field="downloads", title="Downloads"),
> > ]
> > data_table = DataTable(source=source, columns=columns, width=400, height=280)
> >
> > show(widgetbox(data_table))
> >
> > Regards,
> > Foo
> >
> > --
> > 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 bokeh+un...@continuum.io.
> > To post to this group, send email to bo...@continuum.io.
> > To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/b564310b-7e6d-4180-bb47-d4fd0af1bccb%40continuum.io\.
> > For more options, visit https://groups.google.com/a/continuum.io/d/optout\.
>
>
> --
> 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 bokeh+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/1a719860-7ca3-4aa8-933e-298e1aa13699%40continuum.io\.
> For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

--
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/b67dcbc2-5e5f-4df9-aeac-01335a1eb17d%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.