This repository has been archived by the owner on Dec 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.txt
78 lines (78 loc) · 1.87 KB
/
template.txt
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!doctype html>
<html>
<head>
<title>Line Chart</title>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
</head>
<body>
<h1 style="text-align: center;">Validation stats</h1>
<div id="chart_div" style="width: 100%; height: 500px;"></div>
<script>
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('datetime');
data.addColumn('number', 'reward');
data.addColumn({'type': 'string', 'role': 'annotation', 'p': {'html': true}});
data.addColumn('number', 'blocks');
data.addRows([
${Variable}
]);
var options = {
// chartArea: {
// backgroundColor: 'white'
// },
focusTarget: 'category',
annotations: {
alwaysOutside: true,
textStyle: {
fontName: 'Times-Roman',
fontSize: 12,
//bold: true,
//italic: true,
color: 'black',
//auraColor: '#d799ae',
opacity: 0.7
}
},
series: {
0: {targetAxisIndex: 0,
type: 'bars',
},
1: {targetAxisIndex: 1,
type: 'bars',
color: '#ff9696',
}
},
vAxes: {
// Adds titles to each axis.
1: {title: 'Blocks'},
0: {title: 'Rewards (Gram)'}
},
hAxis: {
//title: 'Time of Day',
//format: 'h:mm'
//formatValue: 'd, H:m'
// viewWindow: {
// min: [7, 30, 0],
// max: [17, 30, 0]
// }
},
vAxis: {
// minValue: 0,
// maxValue: 100
titleTextStyle: {
color: '#1a237e',
fontSize: 24,
bold: true
}
},
};
var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</body>
</html>