mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 20:39:23 +00:00
export graph to html function
This commit is contained in:
@ -5,9 +5,8 @@
|
||||
{% trans counter_name=counter %}{{ counter_name }} activity{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
{{ super() }}
|
||||
<script src="{{ static('webpack/graph-index.ts') }}"></script>
|
||||
{% block additionnal_js %}
|
||||
<script defer src="{{ static('webpack/graph-index.ts') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{%- block additional_css -%}
|
||||
@ -43,3 +42,16 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
{{super()}}
|
||||
<script>
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
loadChart({
|
||||
canvas: document.getElementById("activityChart"),
|
||||
startDate: new Date().setDate(new Date().getDate() - 7),
|
||||
counterId: {{ counter.id }},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user