console/app/templates/default/containers/stats.html

55 lines
1.7 KiB
HTML
Raw Normal View History

2015-12-01 02:45:57 +03:00
{% extends "default/_layout.html" %}
{% block title %}Статистика{% endblock %}
2016-01-20 12:15:49 +03:00
{% block head %}
<script type="text/javascript">
window.onload = function () {
var chart = new CanvasJS.Chart(
"chartContainer",
{
title:{
text: "test"
},
animationEnabled: true,
axisY: {
title: "Units Sold",
valueFormatString: "#0,,.",
2016-01-21 02:52:54 +03:00
suffix: "MB"
2016-01-20 12:15:49 +03:00
},
data: [
{
toolTipContent: "{y} units",
type: "splineArea",
markerSize: 5,
color: "rgba(54,158,173,.7)",
dataPoints: [
2016-01-21 02:52:54 +03:00
{% for s in stats_memory %}
{
x: new Date({{ s.year }}, {{ s.month }}, {{ s.day }}, {{ s.hour }}, {{ s.minute }}),
y: {{ s.data }}
},
{% endfor %}
2016-01-20 12:15:49 +03:00
]
}
]
}
);
chart.render();
}
</script>
2016-01-20 12:52:04 +03:00
<script type="text/javascript" src="{{ url_for('static', filename='js/vendor/canvasjs.min.js') }}"></script>
2016-01-20 12:15:49 +03:00
{% endblock %}
2015-12-01 02:45:57 +03:00
{% block content %}
<div class="row">
<div class="large-12 columns">
<h3>Статистика</h3>
</div>
</div>
<div class="row">
2016-01-20 12:15:49 +03:00
<div id="chartContainer" style="height: 300px; width: 100%;">
</div>
2015-12-01 02:45:57 +03:00
</div>
{% endblock %}