Bokeh version: bokeh==0.12.3
CDN_Js version: https://cdn.bokeh.org/bokeh/release/bokeh-0.12.3.min.js
the Bokeh Script JS that gets embedded into the HTML template of Django as below :-
Bokeh.$(function(){
Bokeh.safely(function(){
....
I can get the CDN_js and CDN_css to the DOM , but cant seem to get them into the innerHtml / Html of the correct DIV.
Rest of the code as below :-
<script>
var call_bokehBar = "{% url 'call_bokehBar' %}" //
var bokeh_text = document.getElementById('dynamic_bokeh_body_text1');
bokeh_text.onclick = function() {
$.ajax({
url: call_bokehBar,
type: 'GET',
dataType: 'json',
success: function(resultJSON) {
console.log(resultJSON) // -- YES OK
console.log(resultJSON.div_bokeh) // -- YES OK
console.log(resultJSON.cdn_js) // -- YES OK
$('#second_bokehDiv').html(resultJSON.div_bokeh);
$('#second_bokehDiv').html(resultJSON.js_bokeh);
},
})
};
</script>
Code for the Modal that i need to have the Bokeh bar Chart in :-
<div id="modal_bokeh_main" class="modal_bokeh_backdrop">
<div class="modal_bokeh_content">
<div class="modal_bokeh_header">
<span class="modal_bokeh_close">×</span>
<h2 id = "dynamic_bokeh_header_text"> BOKEH BAR CHART </h2>
</div>
<div class="modal_bokeh_body">
<p id = "dynamic_bokeh_body_text1"> BOKEH BAR CHART </p>
<div id ="first_bokehDiv">
</div>
<div id ="second_bokehDiv">
</div>
</div>
</div>
</div>
Bokeh.$(function(){and hence the cause of your error. I would remove it. - Tony