aboutsummaryrefslogtreecommitdiff
path: root/foris/templates/i2c_collect/i2c_collect.tpl
blob: 12226a530f0fb013975d6d79114e1e0b0e386a38 (plain)
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
%rebase("config/base.tpl", **locals())

<div id="page-i2c-collect" class="config-page">
%include("_messages.tpl")
  <div id="canvas-container">
%for fld in ["voltage", "light", "temperature", "trimmer"]:
    <canvas id="canvas-{{ fld }}"></canvas>
%end
  </div>
</div>


<script>
var graph_data = {
%for fld in ["voltage", "light", "temperature", "trimmer"]:
  "{{ fld }}": [
%	for _, val in enumerate(data[fld]):
    {{ val[1] }},
%	end
  ],
%end
};
var graph_labels = {
%for fld in ["voltage", "light", "temperature", "trimmer"]:
  "{{ fld }}": [
%	for _, val in enumerate(data[fld]):
    "{{ val[0] }}",
%	end
  ],
%end
};
</script>