Skip to content

Commit

Permalink
Fix font issues with firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Bertrand committed Jul 17, 2020
1 parent 115ee54 commit 90563f2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ function radar_visualization(config) {
.attr("text-anchor", "middle")
.style("fill", "#e5e5e5")
.style("font-family", "Arial, Helvetica")
.style("font-size", 42)
.style("font-size", "42px")
.style("font-weight", "bold")
.style("pointer-events", "none")
.style("user-select", "none");
Expand All @@ -274,15 +274,15 @@ function radar_visualization(config) {
.attr("transform", translate(title_offset.x, title_offset.y))
.text(config.title)
.style("font-family", "Arial, Helvetica")
.style("font-size", "34");
.style("font-size", "34px");

// footer
radar.append("text")
.attr("transform", translate(footer_offset.x, footer_offset.y))
.text("▲ moved up ▼ moved down")
.attr("xml:space", "preserve")
.style("font-family", "Arial, Helvetica")
.style("font-size", "10");
.style("font-size", "10px");

// legend
var legend = radar.append("g");
Expand All @@ -294,13 +294,13 @@ function radar_visualization(config) {
))
.text(config.quadrants[quadrant].name)
.style("font-family", "Arial, Helvetica")
.style("font-size", "18");
.style("font-size", "18px");
for (var ring = 0; ring < 4; ring++) {
legend.append("text")
.attr("transform", legend_transform(quadrant, ring))
.text(config.rings[ring].name)
.style("font-family", "Arial, Helvetica")
.style("font-size", "12")
.style("font-size", "12px")
.style("font-weight", "bold");
legend.selectAll(".legend" + quadrant + ring)
.data(segmented[quadrant][ring])
Expand All @@ -311,7 +311,7 @@ function radar_visualization(config) {
.attr("id", function(d, i) { return "legendItem" + d.id; })
.text(function(d, i) { return d.id + ". " + d.label; })
.style("font-family", "Arial, Helvetica")
.style("font-size", "11")
.style("font-size", "11px")
.on("mouseover", function(d) { showBubble(d); highlightLegendItem(d); })
.on("mouseout", function(d) { hideBubble(d); unhighlightLegendItem(d); });
}
Expand Down Expand Up @@ -422,7 +422,7 @@ function radar_visualization(config) {
.attr("text-anchor", "middle")
.style("fill", "#fff")
.style("font-family", "Arial, Helvetica")
.style("font-size", function(d) { return blip_text.length > 2 ? "8" : "9"; })
.style("font-size", function(d) { return blip_text.length > 2 ? "8px" : "9px"; })
.style("pointer-events", "none")
.style("user-select", "none");
}
Expand Down

0 comments on commit 90563f2

Please sign in to comment.