mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-05-15 06:53:06 +00:00
22 lines
548 B
HTML
22 lines
548 B
HTML
{% load i18n %}
|
|
<script nonce="{{request.csp_nonce}}">
|
|
|
|
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>
|
|
|