Open synw opened 6 years ago
I've found the problem: the Altair script must not be inside a Vuejs app block:
<div id="app">
<div id="rawdata_timeline"></div>
<!-- if the altair script is here it does not display -->
</div>
<!-- if it is here it works -->
<script>
const app = new Vue({
el: '#app',
});
</script>
Is this an Altair bug or is it normal? I'll try to find a workaround
I made a dirty workaround, demo updated (requirements update needed: Chartflo 0.5.1 and Dataswim 0.4.22)
I updated the Dataswim lib with Altair 2. I tried to use it to replace the raw data timeline chart in the demo:
It works fine in notebooks but refuses to display in the dashboard. The code is generated using their
to_json
method: source. The chart display well using the generated code if I put it in a single html page, but it refuses to display in the dashboard with absolutely no error message. I use their cdn to load the libs source. Something must be conflicting with the Altair js here. Any idea?