Coverage for src/ipyvizzustory/storylib/template.py: 100%
3 statements
« prev ^ index » next coverage.py v7.2.2, created at 2023-03-25 14:04 +0100
« prev ^ index » next coverage.py v7.2.2, created at 2023-03-25 14:04 +0100
1"""A module for storing the information needed to generate html code."""
4VIZZU_STORY = "https://cdn.jsdelivr.net/npm/vizzu-story@~0.1.0/dist/vizzu-story.min.js"
6DISPLAY_INDENT = " "
8DISPLAY_TEMPLATE = """
9<div>
10 <vizzu-player id="{id}" controller></vizzu-player>
11 <script type="module">
12 import VizzuPlayer from "{vizzu_story}";
15 const vizzuPlayerData = {vizzu_player_data};
16 const vizzuPlayer = document.getElementById("{id}")
17 vizzuPlayer.slides = vizzuPlayerData;
18 vizzuPlayer.vizzu.initializing.then(chart => {{
19 // chart.feature()
20 {chart_features}
21 // chart.on()
22 {chart_events}
23 }});
24 </script>
25</div>
26"""