2023-02-03 21:48:57 +01:00
|
|
|
<html>
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js"></script>
|
|
|
|
<body>
|
|
|
|
|
2023-05-17 19:47:49 +02:00
|
|
|
{% if first and request.args.get('first') == None %}
|
|
|
|
<form method="post">
|
|
|
|
<p>DB is missing table. <input type="submit" value="Create" name="Create"/>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if result == [] %}
|
|
|
|
|
|
|
|
<form method="post">
|
|
|
|
<p>No comics imported. <input type="submit" value="Import" name="Import"/>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if total != covers %}
|
|
|
|
<form method="post">
|
|
|
|
<p>Some covers missing <input type="submit" value="Generate" name="Generate"/>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<h1>Total Comics: {{ total }}</h1>
|
|
|
|
|
2023-02-03 21:48:57 +01:00
|
|
|
<canvas id="myChart" style="width:100%;max-width:600px"></canvas>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
var xValues = {{ pub_list | safe }};
|
|
|
|
var yValues = {{ count }};
|
2023-05-17 22:42:53 +02:00
|
|
|
var barColors = ["red", "green","blue","orange", "purple"];
|
2023-02-03 21:48:57 +01:00
|
|
|
|
|
|
|
new Chart("myChart", {
|
|
|
|
type: "bar",
|
|
|
|
data: {
|
|
|
|
labels: xValues,
|
|
|
|
datasets: [{
|
|
|
|
backgroundColor: barColors,
|
|
|
|
data: yValues
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
options: {
|
|
|
|
legend: {display: false},
|
|
|
|
title: {
|
|
|
|
display: true,
|
|
|
|
text: "Publishers"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<canvas id="myChart3" style="width:100%;max-width:600px"></canvas>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
var xValues = {{ x | safe }};
|
|
|
|
var yValues = {{ y | safe }};
|
|
|
|
|
|
|
|
new Chart("myChart3", {
|
|
|
|
type: "line",
|
|
|
|
data: {
|
|
|
|
labels: xValues,
|
|
|
|
datasets: [{
|
|
|
|
fill: false,
|
|
|
|
backgroundColor: "rgba(0,0,255,1.0)",
|
|
|
|
borderColor: "rgba(0,0,255,0.1)",
|
|
|
|
data: yValues
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
options: {
|
|
|
|
legend: {display: false},
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-13 13:53:16 +02:00
|
|
|
<table id="comics">
|
|
|
|
{% for i in result %}
|
|
|
|
<tr>
|
|
|
|
{% for j in range(0,9) %}
|
|
|
|
<td>{{ i[j] }}</td>
|
|
|
|
{% endfor %}
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
2023-02-03 21:48:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|