0👍
The import
failed in try.js
.
The solution is to relocate the import
in chart.html
.
In chart.html
:
{% extends "base.html" %}
{% block js %}
<div>
<canvas id="myChart"></canvas>
</div>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="../static/js/try.js"></script>
{% endblock %}
I tried this, which worked.
- Chartjs-How can I move a label left, paint it black, or remove it (Chart.JS)?
- Chartjs-ChartJS re-rendering bug
Source:stackexchange.com