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.
37 lines
1.2 KiB
37 lines
1.2 KiB
{% extends 'base_without_left.html' %}
|
|
{% block main %}
|
|
<link href="/static/css/chartist.min.css" rel="stylesheet" type="text/css"/>
|
|
<script src="/static/js/chartist.min.js"></script>
|
|
<script>
|
|
|
|
var chart = new Chartist.Line('#maincontent', {
|
|
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
series: [
|
|
[1, 5, 2, 5, 4, 3],
|
|
[2, 3, 4, 8, 1, 2],
|
|
[5, 4, 3, 2, 1, 0.5]
|
|
]
|
|
}, {
|
|
low: 0,
|
|
showArea: true,
|
|
showPoint: false,
|
|
fullWidth: true,
|
|
height: 500
|
|
});
|
|
|
|
chart.on('draw', function (data) {
|
|
if (data.type === 'line' || data.type === 'area') {
|
|
data.element.animate({
|
|
d: {
|
|
begin: 2000 * data.index,
|
|
dur: 2000,
|
|
from: data.path.clone().scale(1, 0).translate(0, data.chartRect.height()).stringify(),
|
|
to: data.path.clone().stringify(),
|
|
easing: Chartist.Svg.Easing.easeOutQuint
|
|
}
|
|
});
|
|
}
|
|
});
|
|
|
|
</script>
|
|
{% endblock %}
|