On Jan 15, 2017, at 6:03 PM, [email protected] wrote:
Hi Bryan,
Silly question how do I test the commit you pushed to master? Do I have to re-build bokeh? What is the timeline for 0.12.5?
Regards,
On Saturday, January 14, 2017 at 6:18:32 PM UTC-8, ders...@gmail.com wrote:
Thank you for the quick response. I would love to try out dev as refreshing a webpage feels very tacky. It was pretty late last night code that should be posted was as follow:
import Broadcast
from bokeh.io import output_file, show
from bokeh.plotting import figure , curdoc
from bokeh.layouts import widgetbox
from bokeh.models import ColumnDataSource,Button,CustomJS
from bokeh.models.widgets import DataTable, DateFormatter, TableColumn
from bokeh.client import push_session
#output_file("Device Status.html")
data,peername=Broadcast.send(6*1024)
NAME,ID,S1,S2,S3,ONLINE=Broadcast.status(data,peername)
data = dict(
NAME=[NAME],
ID=[ID],
S1=[S1],
S2=[S2],
S3=[S3],
ONLINE=[ONLINE],
IPConn=[peername]
)
source = ColumnDataSource(data)
columns = [
TableColumn(field="NAME", title="Device Name", width=500),
TableColumn(field="ID", title="Device ID", width=300),
TableColumn(field="S1", title="S1", width=700),
TableColumn(field="S2", title="S2", width=700),
TableColumn(field="IPConn", title="IP Connection", width=700),
TableColumn(field="S3", title="S3", width=1500)
]
data_table = DataTable(source=source, columns=columns,width=1000, height=280)
def update():
data,peername=Broadcast.send(6*1024)
NAME,ID,S1,S2,S3,ONLINE=Broadcast.status(data,peername)
data = dict(
NAME=[NAME],
ID=[ID],
S1=[S1],
S2=[S2],
S3=[S3],
ONLINE=[ONLINE],
IPConn=[peername]
)
return data
data=update()
source.data.update(data)
curdoc().add_root(data_table,columns)
curdoc().add_periodic_callback(update, 3900)
On Saturday, January 14, 2017 at 5:42:54 AM UTC-8, ders...@gmail.com wrote:
I am not sure what is missing and am new to Bokeh. I have a parsed broadcast message that I would like to display inside a table widget. The table widget needs to be updated with new data every 3900ms. Through printf's I can see that the call back is called and an update is stored in the dictionary but not streamed or displayed. Any guidance would be truly appreciated. Thank you in advance.
Code """"
import Broadcast
from bokeh.io import curdoc
from bokeh.models import ColumnDataSource
from bokeh.models.widgets import DataTable, DateFormatter, TableColumn
source =ColumnDataSource(dict(NAME=,
ID=,
S1=,
S2=,
S3=,
ONLINE=,
IPConn=))
data_table = DataTable(source=source,width=1000, height=280)
def update_data():
data,peername=Broadcast.send(6*1024)
NAME,ID,S1,S2,S3,ONLINE=Broadcast.status(data,peername)
data = dict(
NAME=[NAME],
ID=[ID],
S1=[S1],
S2=[S2],
S3=[S3],
ONLINE=[ONLINE],
IPConn=[peername]
)
print data
source.stream(data,3900)
curdoc().add_root(data_table)
curdoc().add_periodic_callback(update_data, 3900)
--
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/544cfb1a-e3bf-432b-9987-35ecc0e0a81b%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.