diff --git a/static/bargraph/style.css b/static/bargraph/style.css
index 13dbb1af..4513e56d 100644
--- a/static/bargraph/style.css
+++ b/static/bargraph/style.css
@@ -64,7 +64,7 @@ path.domain {
display: inline-block;
}
-#faq-text {
+.faq-text {
width: 100%;
max-width: 750px;
padding: 5px 10px 0px 10px;
diff --git a/static/pie/pie.css b/static/pie/pie.css
index 6b712c7c..ac8696fe 100644
--- a/static/pie/pie.css
+++ b/static/pie/pie.css
@@ -2,3 +2,7 @@
max-width: 800px;
width: 100%;
}
+
+#pie-wrapper {
+ max-width: 800px;
+}
diff --git a/templates/bargraph/barchart-interactive-nonblocking.html b/templates/bargraph/barchart-interactive-nonblocking.html
index 52c34bc1..b436362e 100644
--- a/templates/bargraph/barchart-interactive-nonblocking.html
+++ b/templates/bargraph/barchart-interactive-nonblocking.html
@@ -2,96 +2,9 @@
diff --git a/templates/pie/pie.html b/templates/pie/pie.html
index 8c740660..c77b6852 100644
--- a/templates/pie/pie.html
+++ b/templates/pie/pie.html
@@ -1,9 +1,18 @@
+{% load static %}
+{% load compress %}
+
+{% compress css file %}
+
+{% endcompress %}
{{ rawData|json_script:"rawDataId" }}
+{% include "visualizer/round-describer.html" with prefix="pie" %}
+
+{% include "visualizer/round-faq.html" with prefix="pie" %}
diff --git a/templates/tabular/tabular-by-round-interactive-nonblocking.html b/templates/tabular/tabular-by-round-interactive-nonblocking.html
index 8fb7d161..f3499e05 100644
--- a/templates/tabular/tabular-by-round-interactive-nonblocking.html
+++ b/templates/tabular/tabular-by-round-interactive-nonblocking.html
@@ -5,12 +5,15 @@
// For slider TODO sync with barchart-interactive.html
var numRounds = {{ tabularByRoundInteractive.rounds|length }};
+const tabularIds = makeRoundComponentIds("tabular");
function showRound(round) {
- for (let i = 0; i < numRounds; i++) {
+ for (let i = 0; i < numRounds; i++) {
document.getElementById("tabular_round_container_"+i).style.display = "none";
}
document.getElementById("tabular_round_container_"+round).style.display = "block";
+ showTextOnRoundDescriber(descriptionOfCurrRound(round), false, tabularIds);
+ updateFaqText(round, tabularIds);
}
showRound(numRounds-1)
@@ -20,5 +23,12 @@
totalRounds: numRounds,
onChange: showRound,
});
+activeRoundPlayer = roundPlayer;
+
+// Show summary text and last-round FAQ on load
+showTextOnRoundDescriber(humanFriendlySummary, false, tabularIds);
+if (window.self === window.top) {
+ makeFaqSectionVisible(tabularIds);
+}
diff --git a/templates/tabular/tabular-by-round-interactive.html b/templates/tabular/tabular-by-round-interactive.html
index 4af15789..a81ba8ab 100644
--- a/templates/tabular/tabular-by-round-interactive.html
+++ b/templates/tabular/tabular-by-round-interactive.html
@@ -1,8 +1,12 @@
{% load static %}
+{% include "visualizer/round-describer.html" with prefix="tabular" %}
+
+{% include "visualizer/round-faq.html" with prefix="tabular" %}
+
{% for round in tabularByRoundInteractive.rounds %}
@@ -15,7 +19,7 @@
Round {{ forloop.counter }}
Current total votes |
-
+
{% for candidate in round %}
{% if candidate.wonThisRound %}
diff --git a/templates/visualizer/round-describer-nonblocking.html b/templates/visualizer/round-describer-nonblocking.html
new file mode 100644
index 00000000..b375359f
--- /dev/null
+++ b/templates/visualizer/round-describer-nonblocking.html
@@ -0,0 +1,81 @@
+
diff --git a/templates/visualizer/round-describer.html b/templates/visualizer/round-describer.html
new file mode 100644
index 00000000..d9d37398
--- /dev/null
+++ b/templates/visualizer/round-describer.html
@@ -0,0 +1,11 @@
+
diff --git a/templates/visualizer/round-faq-nonblocking.html b/templates/visualizer/round-faq-nonblocking.html
new file mode 100644
index 00000000..b70691ee
--- /dev/null
+++ b/templates/visualizer/round-faq-nonblocking.html
@@ -0,0 +1,38 @@
+
diff --git a/templates/visualizer/round-faq.html b/templates/visualizer/round-faq.html
new file mode 100644
index 00000000..04f23a4a
--- /dev/null
+++ b/templates/visualizer/round-faq.html
@@ -0,0 +1 @@
+
diff --git a/templates/visualizer/visualize-ballotpedia.html b/templates/visualizer/visualize-ballotpedia.html
index a7c7d228..84408377 100644
--- a/templates/visualizer/visualize-ballotpedia.html
+++ b/templates/visualizer/visualize-ballotpedia.html
@@ -50,6 +50,8 @@
{% include "visualizer/common-visualizer-nonblocking.html" %}
+ {% include "visualizer/round-describer-nonblocking.html" %}
+ {% include "visualizer/round-faq-nonblocking.html" %}
{% include "bargraph/barchart-common-nonblocking.html" %}
{% include "bargraph/barchart-interactive-nonblocking.html" %}