On Nov 7, 2017, at 18:12, Foo <pushen@gmail.com> 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+unsubscribe@continuum.io.
To post to this group, send email to bokeh@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\.