forked from ahaym/boke-hs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample.html
59 lines (53 loc) · 5.87 KB
/
sample.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bokeh Plot</title>
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-0.12.16.min.css" type="text/css" />
<script type="text/javascript" src="https://cdn.pydata.org/bokeh/release/bokeh-0.12.16.min.js"></script>
<script type="text/javascript">
Bokeh.set_log_level("info");
</script>
</head>
<body>
<div class="bk-root">
<div class="bk-plotdiv" id="plot_div"></div>
</div>
<script type="application/json" id="container_obj">
{"top_obj":{"roots":{"root_ids":["plot_id"],"references":[{"attributes":{"background_fill_color":{"value":"#ffffff"},"x_range":{"id":"3","type":"Range1d"},"left":[{"id":"21","type":"LinearAxis"}],"y_scale":{"id":"6","type":"LinearScale"},"y_range":{"id":"4","type":"Range1d"},"above":[],"plot_height":1000,"x_scale":{"id":"5","type":"LinearScale"},"right":[],"title":{"id":"1","type":"Title"},"below":[{"id":"24","type":"LinearAxis"}],"renderers":[{"id":"12","type":"GlyphRenderer"},{"id":"18","type":"GlyphRenderer"},{"id":"21","type":"LinearAxis"},{"id":"24","type":"LinearAxis"}],"plot_width":1000,"toolbar":{"id":"2","type":"Toolbar"}},"id":"plot_id","type":"Plot"},{"attributes":{"plot":{"id":"plot_id","type":"Plot"},"ticker":{"id":"23","type":"BasicTicker"},"formatter":{"id":"22","type":"BasicTickFormatter"}},"id":"24","type":"LinearAxis"},{"attributes":{},"id":"23","type":"BasicTicker"},{"attributes":{},"id":"22","type":"BasicTickFormatter"},{"attributes":{"plot":{"id":"plot_id","type":"Plot"},"ticker":{"id":"20","type":"BasicTicker"},"formatter":{"id":"19","type":"BasicTickFormatter"}},"id":"21","type":"LinearAxis"},{"attributes":{},"id":"20","type":"BasicTicker"},{"attributes":{},"id":"19","type":"BasicTickFormatter"},{"attributes":{"glyph":{"id":"16","type":"Line"},"data_source":{"id":"15","type":"ColumnDataSource"},"muted_glyph":null,"hover_glyph":null,"view":{"id":"17","type":"CDSView"}},"id":"18","type":"GlyphRenderer"},{"attributes":{"source":{"id":"15","type":"ColumnDataSource"}},"id":"17","type":"CDSView"},{"attributes":{"line_dash":[],"line_width":6,"line_dash_offset":0,"line_alpha":0.6,"line_join":"miter","line_color":"#ff0000","x":{"field":"x"},"line_cap":"round","y":{"field":"y"}},"id":"16","type":"Line"},{"attributes":{"data":{"x":[-0.5,1.8333333333333335,4.166666666666667,6.5,8.833333333333334,11.166666666666668,13.5,15.833333333333336,18.166666666666668,20.5],"y":[3.75,4.916666666666667,6.083333333333334,7.25,8.416666666666667,9.583333333333334,10.75,11.916666666666668,13.083333333333334,14.25]},"selected":{"id":"13","type":"Selection"},"selection_policy":{"id":"14","type":"UnionRenderers"},"callback":null},"id":"15","type":"ColumnDataSource"},{"attributes":{},"id":"14","type":"UnionRenderers"},{"attributes":{},"id":"13","type":"Selection"},{"attributes":{"glyph":{"id":"10","type":"Line"},"data_source":{"id":"9","type":"ColumnDataSource"},"muted_glyph":null,"hover_glyph":null,"view":{"id":"11","type":"CDSView"}},"id":"12","type":"GlyphRenderer"},{"attributes":{"source":{"id":"9","type":"ColumnDataSource"}},"id":"11","type":"CDSView"},{"attributes":{"line_dash":[2,4,6,4],"line_width":3,"line_dash_offset":0,"line_alpha":1,"line_join":"miter","line_color":"#008000","x":{"field":"x"},"line_cap":"butt","y":{"field":"y"}},"id":"10","type":"Line"},{"attributes":{"data":{"x":[-0.5,1.8333333333333335,4.166666666666667,6.5,8.833333333333334,11.166666666666668,13.5,15.833333333333336,18.166666666666668,20.5],"y":[2.75,3.916666666666667,5.083333333333334,6.25,10.416666666666667,2.583333333333334,7.75,5.916666666666668,19.083333333333334,13.25]},"selected":{"id":"7","type":"Selection"},"selection_policy":{"id":"8","type":"UnionRenderers"},"callback":null},"id":"9","type":"ColumnDataSource"},{"attributes":{},"id":"8","type":"UnionRenderers"},{"attributes":{},"id":"7","type":"Selection"},{"attributes":{},"id":"6","type":"LinearScale"},{"attributes":{},"id":"5","type":"LinearScale"},{"attributes":{"start":-0.5,"end":22,"callback":null},"id":"4","type":"Range1d"},{"attributes":{"start":-0.5,"end":22,"callback":null},"id":"3","type":"Range1d"},{"attributes":{"active_inspect":"auto","active_scroll":"auto","active_tap":"auto","active_drag":"auto"},"id":"2","type":"Toolbar"},{"attributes":{"text":"Sample BokeHS plot","plot":null},"id":"1","type":"Title"}]},"version":"0.12.16","title":"BokeHS Application"}}
</script>
<script type="text/javascript">
(function() {
var fn = function() {
Bokeh.safely(function() {
(function(root) {
function embed_document(root) {
var docs_json = document.getElementById('container_obj').textContent;
var render_items = [{"docid":"top_obj","elementid":"plot_div","modelid":"plot_id"}];
root.Bokeh.embed.embed_items(docs_json, render_items);
}
if (root.Bokeh !== undefined) {
embed_document(root);
} else {
var attempts = 0;
var timer = setInterval(function(root) {
if (root.Bokeh !== undefined) {
embed_document(root);
clearInterval(timer);
}
attempts++;
if (attempts > 100) {
console.log("Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing")
clearInterval(timer);
}
}, 10, root)
}
})(window);
});
};
if (document.readyState != "loading") fn();
else document.addEventListener("DOMContentLoaded", fn);
})();
</script>
</body>
</html>