moviewyrm/bookwyrm/templates/settings/dashboard/works_chart.html

22 lines
518 B
HTML
Raw Normal View History

2021-10-04 18:14:50 +00:00
{% load i18n %}
<script>
var worksStats = new Chart(
document.getElementById('works_stats'),
{
type: 'bar',
data: {
labels: [{% for label in works_stats.labels %}"{{ label }}",{% endfor %}],
datasets: [{
label: '{% trans "Works" %}',
backgroundColor: 'hsl(204, 86%, 53%)',
borderColor: 'hsl(204, 86%, 53%)',
data: {{ works_stats.total }},
}]
},
options: {}
}
);
</script>