-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBokehINFO.txt
60 lines (41 loc) · 2.21 KB
/
BokehINFO.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Bokeh info:
callback can be used in:
tools(SelectTool, HoverTool, TapTool)
widgets (AbstractButton, InputWidget )
Tabs - A callback to run in the browser whenever the button is activated
Range - A callback to run in the browser whenever the range is updated
ColumnsDataSource - A callback to run in the browser whenever the selection is changed + AjaxDataSource, BlazeDataSource, ServerDataSource
The CustomJS callback has:
args - arg mappings
code - the JS code
model === data that is to be drawn (range, data source objects)
documents === set of models
box választó, ami csak sávot tud választani
BoxSelectTool(dimensions=["width"])
vizszintes hoover - mindent kiválaszt (index objektumba rak) ami a kurzorral egy magasságban van
p.add_tools(HoverTool(tooltips=None, callback=callback, renderers=[cr], mode='hline'))
autoload:
https://github.com/bokeh/bokeh/issues/3231
js, tag = autoload_static(chart, CDN, "http://www.joshhaines.com/js/bokeh.js") lehet, hogy ez mégsem az...
Can I make a default selection from Python? That would initialize the graph and maybe trigger the execution of JS callback.
glyphs have data_source attr (also on python side):
https://github.com/bokeh/bokeh/blob/master/examples/plotting/server/selection_histogram.py
source.on_change('selected',self,'update_filter')
Select.on_change ...
Button.on_change ...
https://github.com/bokeh/bokeh/blob/0.9.0/examples/glyphs/population_server.py
https://github.com/bokeh/bokeh/blob/0.9.0/examples/glyphs/taylor_server.py
https://groups.google.com/a/continuum.io/forum/#!topic/bokeh/-fPwXKBfWHs
plot.get('renderers')
renderer.get('data_source')
TODO: what object have on_change?
def callback(obj, attr, old, new):
...
source.on_change('selected', callback)
textInput.on_change('value', update_title) (works only in version 0.11)
for w in ["MVA_1", "MVA_2"]:
getattr(self, w).on_change('value', self, 'input_change')
self.toggle.on_click(self.checkbox_handler)
Can I call on_change(server side) from a JS script???
No real answers yet. You can call any Python script from JS in a standard way, but with Bokeh...?
http://chdoig.github.com/scipy2015-blaze-bokeh - some server examples