changxin commited on
Commit
5e52904
·
1 Parent(s): 8829c1f

Create new file

Browse files
Files changed (1) hide show
  1. templates/simple_globe.html +41 -0
templates/simple_globe.html ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% import 'macro' as macro %}
2
+ <!DOCTYPE html>
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <title>{{ chart.page_title }}</title>
7
+ {{ macro.render_chart_dependencies(chart) }}
8
+ </head>
9
+ <body>
10
+ <div id="{{ chart.chart_id }}" style="width:{{ chart.width }}; height:{{ chart.height }};"></div>
11
+ <script>
12
+ var canvas_{{ chart.chart_id }} = document.createElement('canvas');
13
+ var mapChart_{{ chart.chart_id }} = echarts.init(
14
+ canvas_{{ chart.chart_id }}, '{{ chart.theme }}', {width: 4096, height: 2048, renderer: '{{ chart.renderer }}'});
15
+ {% for js in chart.js_functions.items %}
16
+ {{ js }}
17
+ {% endfor %}
18
+ var mapOption_{{ chart.chart_id }} = {{ chart.json_contents }};
19
+ mapChart_{{ chart.chart_id }}.setOption(mapOption_{{ chart.chart_id }});
20
+
21
+ var chart_{{ chart.chart_id }} = echarts.init(
22
+ document.getElementById('{{ chart.chart_id }}'), '{{ chart.theme }}', {renderer: '{{ chart.renderer }}'});
23
+ var options_{{ chart.chart_id }} = {
24
+ "globe": {
25
+ "show": true,
26
+ "baseTexture": mapChart_{{ chart.chart_id }},
27
+ shading: 'lambert',
28
+ light: {
29
+ ambient: {
30
+ intensity: 0.6
31
+ },
32
+ main: {
33
+ intensity: 0.2
34
+ }
35
+ }
36
+
37
+ }};
38
+ chart_{{ chart.chart_id }}.setOption(options_{{ chart.chart_id }});
39
+ </script>
40
+ </body>
41
+ </html>