Guest User

Untitled

a guest
Jun 18th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. multi_select = Select (title = "Select Quarters" , value = str1, options = df)
  2.  
  3. def function_to_call(attrname, old, new):
  4. print(multi_select.value)
  5.  
  6. text=("""<!DOCTYPE html>
  7. <html lang="en">
  8. <head>
  9. <meta charset="utf-8">
  10. {{ bokeh_css }}
  11. {{ bokeh_js }}
  12. </head>
  13. <body>
  14. <style type="text/css">
  15. {% include 'styles.css' %}
  16. </style>
  17. {{ plot_div|indent(8) }}
  18. {{ plot_script|indent(8) }}
  19. <div>
  20. <h1 style="color:#8CC43F">{selectval}</h1>
  21. </div>
  22. </body>
  23. </html>
  24. """)
  25.  
  26. m =multi_select.on_change('value',function_to_call)
  27. text = text.format(selectval=m)
  28. div = Div(text=text,width=200, height=100)
  29.  
  30. curdoc().add_root(widgetbox(multi_select,div))
Add Comment
Please, Sign In to add comment