Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update createDiversityGaugeChart to use d3.js radial functions in place of multiple linear functions #338

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update hardcodes values with constants
  • Loading branch information
ayobi committed Nov 26, 2024
commit d0324cfc65d509f034dd35d30ee38d67b10a64a5
9 changes: 5 additions & 4 deletions microsetta_interface/templates/new_results_page.jinja2
Original file line number Diff line number Diff line change
@@ -1433,7 +1433,7 @@
.style("font-size", "18px")
.style("font-weight", "700")
.style("line-height", "24px")
.text("2.40");
.text(lowestDiversityScore);

svg.append("text")
.attr("x", -radius + 67.5)
@@ -1464,7 +1464,7 @@
.style("font-size", "18px")
.style("font-weight", "700")
.style("line-height", "24px")
.text("7.25");
.text(highestDiversityScore);

svg.append("text")
.attr("x", 172.5)
@@ -1485,16 +1485,17 @@
.style("font-size", "18px")
.style("font-weight", "700")
.style("line-height", "24px")
.text("5.31");
.text(averageDiversityScore);

const hadzaAverageValue = document.getElementById('average-hadza-observed-average').innerText;
svg.append("text")
.attr("x", 110)
.attr("y", -radius + 185)
.style("fill", "#006A96")
.style("font-size", "18px")
.style("font-weight", "700")
.style("line-height", "24px")
.text("6.30");
.text(hadzaAverageValue);

svg.append("a")
.attr("xlink:href", "https://www.nature.com/articles/d41586-023-02065-y")