On Jun 9, 2018, at 09:43, koseoglubaran@gmail.com wrote:
Thanks for reply, upon checking the link and writing the below code. I get None is not a callable object error when running,
from bokeh.plotting import figure, output_file, show
from bokeh import events
from bokeh.models import CustomJS,ColumnDataSource,Slider,DataRange1d,HoverTool,Legend,LinearAxis,BoxSelectTool,Rect#,GMapOptions,WMTSTileSource
# output to static HTML file
callbackBoxSelect = CustomJS(code = """ console.log("yey2") """)
box_selectMap = BoxSelectTool(callback=callbackBoxSelect)
output_file("line.html")
tools='pan,wheel_zoom,reset'
def print_event(attributes = ):
print("yey")
p = figure(plot_width=400, plot_height=400,tools=[tools,box_selectMap])
p.on_event(events.SelectionGeometry, print_event(attributes=['geometry', 'final']))
# add a circle renderer with a size, color, and alpha
p.circle([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], size=20, color="navy", alpha=0.5)
# show the results
show(p)
On Saturday, June 9, 2018 at 7:24:42 PM UTC+3, Bryan Van de ven wrote:
Hi,
Take a look at this examples, particularly the SelectionGeometry part:
https://github.com/bokeh/bokeh/blob/master/examples/howto/events_app.py
Thanks,
Bryan
> On Jun 9, 2018, at 09:17, koseog...@gmail.com wrote:
>
> Hi,
>
> I am trying to get geometry attribute of box tool. However, I want to use these values on server side. What I would normally do was to define a CustomJs callback function on box select tool but in this case, it doesn't work out. Could you please explain me how can I achieve this?
>
> Thanks
>
> --
> 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/62f53b52-9e7f-4b40-9951-cf2b24f9a69e%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/aa1edf33-a7e4-4520-981f-b634d1af0eb2%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.