You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
2.8 KiB
63 lines
2.8 KiB
{% extends request.is_ajax|yesno:'nullcont.htm,abonapp/ext.htm' %}
|
|
{% load i18n %}
|
|
{% block content %}
|
|
|
|
<div class="row">
|
|
<div class="col-sm-10">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title">{% trans 'Graph of use' %}</h3>
|
|
</div>
|
|
<div class="panel-body">
|
|
{% if charts_data %}
|
|
<div id="chrt"></div>
|
|
<script type="text/javascript">
|
|
$(document).ready(function ($) {
|
|
new Chartist.Line('#chrt', {
|
|
series: [
|
|
{
|
|
data: [
|
|
{{ charts_data }}
|
|
]
|
|
}
|
|
]
|
|
}, {
|
|
height: '600px',
|
|
showArea: true,
|
|
showLine: false,
|
|
showPoint: false,
|
|
high: {{ high }},
|
|
axisX: {
|
|
type: Chartist.FixedScaleAxis,
|
|
divisor: 12,
|
|
labelInterpolationFnc: function (value) {
|
|
return moment(value).format('HH:mm:ss');
|
|
}
|
|
},
|
|
lineSmooth: Chartist.Interpolation.cardinal({
|
|
tension: 0
|
|
})
|
|
});
|
|
});
|
|
</script>
|
|
{% else %}
|
|
<h2>{% trans 'Static info was Not found' %}</h2>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-2">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">{% trans 'Graphs by dates' %}</div>
|
|
<div class="list-group">
|
|
{% for dat in dates %}
|
|
<a href="{% url 'abonapp:charts' abon_group.pk abon.pk %}?wantdate={{ dat|date:'dmY' }}" class="list-group-item{% if dat == now %} active{% endif %}">{{ dat|date:'j E' }}</a>
|
|
{% empty %}
|
|
{% trans 'Static info was Not found' %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|