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

22 lines
523 B
HTML
Raw Normal View History

2021-09-11 14:09:05 +00:00
{% load i18n %}
<script>
var statusStats = new Chart(
document.getElementById('status_stats'),
2021-10-04 17:53:22 +00:00
{
type: 'bar',
data: {
labels: [{% for label in status_stats.labels %}"{{ label }}",{% endfor %}],
datasets: [{
label: '{% trans "Statuses posted" %}',
backgroundColor: 'rgb(255, 99, 132)',
borderColor: 'rgb(255, 99, 132)',
data: {{ status_stats.total }},
}]
},
options: {}
},
2021-09-11 14:09:05 +00:00
);
</script>