Skip to content

Commit 69da2f4

Browse files
committed
tweak spacing and sizes
1 parent 8553e11 commit 69da2f4

File tree

1 file changed

+2
-1
lines changed
  • src/2024-11-08-portland-elections

1 file changed

+2
-1
lines changed

src/2024-11-08-portland-elections/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function drawSankey(data, w, h) {
131131
const sankey = d3Sankey.sankey()
132132
.nodeId(d => d.name)
133133
.nodeWidth(10)
134-
.nodePadding(20)
134+
.nodePadding(15)
135135
.extent([[margin.left, margin.top], [margin.left + width, margin.top + height]])
136136
.nodeAlign(d3Sankey.sankeyLeft)
137137
.nodeSort((a, b) => d3.descending(wonIn.get(a.category), wonIn.get(b.category)) || d3.ascending(a.value, b.value));
@@ -207,6 +207,7 @@ function drawSankey(data, w, h) {
207207
.attr("x", d => d.x0 < width / 2 ? d.x1 + 6 : d.x0 - 6)
208208
.attr("y", d => (d.y1 + d.y0) / 2)
209209
.attr("dy", "0.35em")
210+
.attr("font-size", "1.3em")
210211
.attr("text-anchor", d => d.x0 < width / 2 ? "start" : "end")
211212
.attr("fill", "currentcolor")
212213
.text(d => `${d.name.replace(/\s*\(\d+\)$/, "")} (${percent(d.value)})`);

0 commit comments

Comments
 (0)