<script>
var ctx = $('#atndCount');
var atndCount = new Chart(ctx, {
type: 'bar',
data: {
labels: [ {% set pipe = joiner(",") %}
{% for k,v in count_dict.items() %}
{{ pipe() }} "{{k}}"
{% endfor %}
],
datasets: [
{
label: "异常次数 (次)",
backgroundColor: ["#FF6384", "#36A2EB", "#4BC0C0", "#FFCD56", "#F39346", "#FF86D0", "#91BAFF", "#FF7979"],
data: [{% set pipe = joiner(",") %}
{% for k,v in count_dict.items() %}
{{ pipe() }} {{v}}
{% endfor %}]
}
]
},
options: {
maintainAspectRatio: false,
responsive: true,
legend: {display: false},
title: {
display: true,
text: '考勤异常情况'
}
}
});
</script>
网友评论