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

20 lines
538 B
HTML
Raw Normal View History

2021-09-11 14:09:05 +00:00
{% load i18n %}
<script>
2021-10-04 17:53:22 +00:00
var registerStats = new Chart(
document.getElementById('register_stats'),
{
type: 'bar',
data: {
labels: [{% for label in register_stats.labels %}"{{ label }}",{% endfor %}],
datasets: [{
label: '{% trans "Registrations" %}',
2021-10-04 18:14:50 +00:00
backgroundColor: 'hsl(171, 100%, 41%)',
borderColor: 'hsl(171, 100%, 41%)',
2021-10-04 17:53:22 +00:00
data: {{ register_stats.total }},
}]
},
options: {}
}
2021-09-11 14:09:05 +00:00
);
</script>