-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.html
48 lines (45 loc) · 1.12 KB
/
template.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
<html>
<head>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
</head>
<title>
{{ prefix }} - {{ name }} - {{ start_time }} - {{ event_id }}
</title>
<body>
<h2>{{ name }} - {{ start_time }}</h2>
<p>Event ID: {{ event_id }}</p>
<p>Unique IP Addresses: {{ distinct_ips }}</p>
<p>Unique Clients: {{ distinct_clients }}</p>
{% for item in charts %}
<div id="chart_{{loop.index}}" style="width:100%;height:300px;"></div>
{% endfor %}
</body>
{{ prefix }} - {{ name }} - {{ start_time }} - {{ event_id }}
<script>
let chart = null;
{% for item in charts %}
chart = document.getElementById("chart_{{loop.index}}");
Plotly.plot(
chart,
[
{
x: {{ item['x'] }},
{% if item['y'] != '' %}y: {{ item['y'] }},{% endif %}
type: '{{ item['chart_type'] }}'
}
],
{
title: {
text: '{{ item['title'] }}',
font: {
family: "Arial",
size: 20
},
xref: "paper",
x: 0
}
}
);
{% endfor %}
</script>
</html>