console/app/templates/default/containers/stats.html
2016-01-20 12:52:04 +03:00

72 lines
2.8 KiB
HTML

{% extends "default/_layout.html" %}
{% block title %}Статистика{% endblock %}
{% 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,,.",
suffix: " t"
},
data: [
{
toolTipContent: "{y} units",
type: "splineArea",
markerSize: 5,
color: "rgba(54,158,173,.7)",
dataPoints: [
{x: new Date(2016,0,16,5), y: 239400},
{x: new Date(2016,0,16,6), y: 187200},
{x: new Date(2016,0,16,7), y: 214000},
{x: new Date(2016,0,16,8), y: 728900},
{x: new Date(2016,0,16,9), y: 483000},
{x: new Date(2016,0,16,10), y: 200000},
{x: new Date(2016,0,16,11), y: 284000},
{x: new Date(2016,0,16,12), y: 250600},
{x: new Date(2016,0,16,13), y: 279800},
{x: new Date(2016,0,16,14), y: 338600},
{x: new Date(2016,0,16,15), y: 694400},
{x: new Date(2016,0,16,16), y: 602600},
{x: new Date(2016,0,16,17), y: 239400},
{x: new Date(2016,0,16,18), y: 187200},
{x: new Date(2016,0,16,19), y: 214000},
{x: new Date(2016,0,16,20), y: 728900},
{x: new Date(2016,0,16,21), y: 483000},
{x: new Date(2016,0,16,22), y: 200000},
{x: new Date(2016,0,16,23), y: 284000},
{x: new Date(2016,0,17,0), y: 250600},
{x: new Date(2016,0,17,1), y: 279800},
{x: new Date(2016,0,17,2), y: 338600},
{x: new Date(2016,0,17,3), y: 694400},
{x: new Date(2016,0,17,4), y: 602600},
]
}
]
}
);
chart.render();
}
</script>
<script type="text/javascript" src="{{ url_for('static', filename='js/vendor/canvasjs.min.js') }}"></script>
{% endblock %}
{% block content %}
<div class="row">
<div class="large-12 columns">
<h3>Статистика</h3>
</div>
</div>
<div class="row">
<div id="chartContainer" style="height: 300px; width: 100%;">
</div>
</div>
{% endblock %}