In this example we are using bokehJS, used internally by bokeh to render the plots in the browser.
Here you have a jsfiddle working example that you can modify to learn how it works.