aboutsummaryrefslogtreecommitdiff
path: root/app/templates
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2019-07-31 16:28:31 +0100
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2019-07-31 16:28:31 +0100
commit1fd0dd8b28bac19431a8c577ee78ea655882ad82 (patch)
tree5345d5070a8a472b50538f05349a27751ef87ffa /app/templates
parentAdd demo data to repo (diff)
downloadAnnotateChange-1fd0dd8b28bac19431a8c577ee78ea655882ad82.tar.gz
AnnotateChange-1fd0dd8b28bac19431a8c577ee78ea655882ad82.zip
Add support for multidimensional datasets
Diffstat (limited to 'app/templates')
-rw-r--r--app/templates/admin/annotations_by_dataset.html4
-rw-r--r--app/templates/annotate/index.html6
-rw-r--r--app/templates/demo/evaluate.html37
3 files changed, 31 insertions, 16 deletions
diff --git a/app/templates/admin/annotations_by_dataset.html b/app/templates/admin/annotations_by_dataset.html
index 3885d7f..fd64673 100644
--- a/app/templates/admin/annotations_by_dataset.html
+++ b/app/templates/admin/annotations_by_dataset.html
@@ -13,7 +13,11 @@
{% block scripts %}
{{ super() }}
<script src="//d3js.org/d3.v5.min.js"></script>
+ {% if is_multi %}
+ <script src="{{ url_for('static', filename='js/makeChartMulti.js') }}"></script>
+ {% else %}
<script src="{{ url_for('static', filename='js/makeChart.js') }}"></script>
+ {% endif %}
<script>adminViewAnnotations(
'#graph',
{{ data.chart_data | tojson }},
diff --git a/app/templates/annotate/index.html b/app/templates/annotate/index.html
index 61233a8..5360bf8 100644
--- a/app/templates/annotate/index.html
+++ b/app/templates/annotate/index.html
@@ -52,9 +52,13 @@
{% block scripts %}
{{ super() }}
<script src="//d3js.org/d3.v5.min.js"></script>
- <script src="{{ url_for('static', filename='js/makeChart.js') }}"></script>
<script src="{{ url_for('static', filename='js/updateTable.js') }}"></script>
<script src="{{ url_for('static', filename='js/buttons.js') }}"></script>
+ {% if is_multi %}
+ <script src="{{ url_for('static', filename='js/makeChartMulti.js') }}"></script>
+ {% else %}
+ <script src="{{ url_for('static', filename='js/makeChart.js') }}"></script>
+ {% endif %}
<script>annotateChart("#graph", {{ data.chart_data | tojson }});</script>
<script>
// reset button
diff --git a/app/templates/demo/evaluate.html b/app/templates/demo/evaluate.html
index 225dade..3f20c94 100644
--- a/app/templates/demo/evaluate.html
+++ b/app/templates/demo/evaluate.html
@@ -31,20 +31,27 @@
{{ wtf.quick_form(form, button_map={'submit': 'primary'}) }}
</div>
</div>
+{% endblock %}
-<script src="//d3js.org/d3.v5.min.js"></script>
-<script src="{{ url_for('static', filename='js/makeChart.js') }}"></script>
-<script>viewAnnotations(
- "#graph_user",
- {{ data.chart_data | tojson }},
- {{ annotations_user | tojson }}
-);
-</script>
-<script>
- viewAnnotations(
- "#graph_true",
- {{ data.chart_data | tojson }},
- {{ annotations_true | tojson }}
-);
-</script>
+{% block scripts %}
+ {{ super() }}
+ <script src="//d3js.org/d3.v5.min.js"></script>
+ {% if is_multi %}
+ <script src="{{ url_for('static', filename='js/makeChartMulti.js') }}"></script>
+ {% else %}
+ <script src="{{ url_for('static', filename='js/makeChart.js') }}"></script>
+ {% endif %}
+ <script>viewAnnotations(
+ "#graph_user",
+ {{ data.chart_data | tojson }},
+ {{ annotations_user | tojson }}
+ );
+ </script>
+ <script>
+ viewAnnotations(
+ "#graph_true",
+ {{ data.chart_data | tojson }},
+ {{ annotations_true | tojson }}
+ );
+ </script>
{% endblock %}