Skip to content

Commit

Permalink
Double size of dots to look better on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
dfeldman committed Mar 31, 2024
1 parent 403dc7e commit 3e53867
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
.dot {
stroke: #1d1d1f;
cursor: pointer;
r: 10;
}

.dot-label {
Expand Down Expand Up @@ -238,7 +239,7 @@
}

.dot {
r: 10;
r: 20;
}
.dot-label {
display:none;
Expand Down Expand Up @@ -692,7 +693,7 @@ <h3>
.join("text")
.attr("class", "dot-label")
.attr("x", d => xScale(d[xMetric]))
.attr("y", d => yScale(d[yMetric]) - 12)
.attr("y", d => yScale(d[yMetric]) - 22)
.text(d => d.name)
.style("text-anchor", "middle")
.style("font-size", "12px")
Expand Down Expand Up @@ -720,7 +721,7 @@ <h3>
// Insert the rect before the text element so it appears behind
labelLayer.insert("rect",":first-child") // Ensure rects are behind all texts
.attr("x", xPosition)
.attr("y", yScale(d[yMetric]) - rectHeight + (rectHeight / 4)-12) // Adjust Y position as needed
.attr("y", yScale(d[yMetric]) - rectHeight + (rectHeight / 4)-22) // Adjust Y position as needed
.attr("width", rectWidth)
.attr("height", rectHeight)
.attr("rx", 5) // Customize the corner radius
Expand Down

0 comments on commit 3e53867

Please sign in to comment.