Skip to content

[#1061] Airdrop chart polish: inside labels, generic numbering, CMC, smooth curve, font#1062

Merged
realproject7 merged 1 commit intomainfrom
task/1061-chart-polish
May 6, 2026
Merged

[#1061] Airdrop chart polish: inside labels, generic numbering, CMC, smooth curve, font#1062
realproject7 merged 1 commit intomainfrom
task/1061-chart-polish

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Fixes #1061

Summary

Five polish fixes from user feedback on the chart shipped in #1060.

# Change File
1 Milestone label blocks moved INSIDE chart, anchored to LEFT of each vertical line CampaignHero.tsx
2 Tier names replaced with MILESTONE N (M1 on mobile); bottom tier-name X-axis labels dropped CampaignHero.tsx
3 Rank gains CMC prefix; footnote in hero + modal appended with · CMC = CoinMarketCap CampaignHero.tsx
4 makeMcapToX rewritten as monotone cubic Hermite (Catmull-Rom slopes in log10 mcap → X space) — C¹-smooth at every knot, no more visible kink CampaignHero.tsx
5 SVG and mobile legend wrapped in font-mono to inherit Geist Mono per globals.css:56-57; all inline fontFamily="monospace" removed CampaignHero.tsx

Smooth-curve math (fix #4)

Old: piecewise log-interp inside each band. dx/d(log m) constant within band but jumps at knots because each band has different log range (band 0=2dec, band 1=1dec, band 2=0.7dec, band 3=0.3dec). Visible kink at gold→diamond on the live chart.

New: monotone cubic Hermite. Slopes at each knot use the Catmull-Rom centered formula (xs[i+1]-xs[i-1]) / (lms[i+1]-lms[i-1]) (one-sided at endpoints). Within segment [lms[i-1], lms[i]], standard cubic Hermite basis h00·x0 + h10·dt·m0 + h01·x1 + h11·dt·m1 with u = (t-t0)/dt. Passes exactly through all 5 knots (X = 0/0.25/0.5/0.75/1.0), C¹-continuous everywhere, monotonic on our data (slopes are monotonically increasing).

Curve renders by sampling 200 MCap points uniformly in log space and connecting with L. Heartbeat dot uses the same mcapToX, so it lies exactly on the curve.

Files

  • src/components/airdrop/CampaignHero.tsx
  • package.json — 1.8.0 → 1.8.1

Verification

  • npm run typecheck passes
  • npm run lint clean for CampaignHero.tsx
  • Spot checks: mcapToX($1M) = 0.25, mcapToX($10M) = 0.5, mcapToX($50M) = 0.75, mcapToX($100M) = 1.0 (knot exactness)
  • mcapToX($33K) ≈ 0.061 (slightly different from old 0.065 — both put the dot in pre-bronze band)

Test plan

  • All four milestone label blocks render INSIDE the chart, right-edge of each block aligned just left of its vertical line
  • Each block reads MILESTONE N / \$value / unlocks Y% / CMC ≈ #Z
  • No bottom tier-name X-axis labels
  • Footnote: MCap = PLOT price × 1M max supply · CMC = CoinMarketCap
  • Curve smooth at all milestone knots — no visible kink at gold→diamond or anywhere else
  • Heartbeat dot sits exactly on the curve at current MCap
  • All chart text uses Geist Mono (matches the rest of the project)
  • Mobile: 4-column legend with M1 / M2 / M3 / M4 labels

…smooth curve, font

Five fixes per user feedback on the chart from #1060:

1. Move milestone label blocks INSIDE the chart, anchored to the LEFT
   of each vertical line (text-anchor="end", x = lineX - 6). Each block
   has 4 lines stacked from top of chart: tier title / $value /
   unlocks % / CMC ≈ rank.

2. Replace "Bronze/Silver/Gold/Diamond" with "MILESTONE 1/2/3/4" in
   labels and mobile legend ("M1/M2/M3/M4"). Drop TIER_NAMES map and
   the redundant bottom tier-name X-axis labels.

3. Add "CMC" prefix to ranks ("CMC ≈ #1900") and append
   "· CMC = CoinMarketCap" to both footnotes (campaign hero footer and
   the modal footnote).

4. Replace banded log mcapToX with monotone cubic Hermite using
   Catmull-Rom slopes in (log10 mcap, X) space. C¹-continuous so the
   curve has no visible slope discontinuity at any milestone knot, while
   still passing exactly through the 5 knot points (X positions remain
   0/0.25/0.5/0.75/1.0).

5. Apply the project's font system: wrap the SVG in
   <svg className="font-mono"> so all text inherits Geist Mono per the
   .font-mono rule in src/app/globals.css. Remove all inline
   fontFamily="monospace". Mobile legend wrapper also picks up font-mono.

Reviewer note: block if labels go back above the chart, tier names
return, or curve kink reappears at any milestone knot.

Fixes #1061

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored May 6, 2026 3:55am

Request Review

@realproject7 realproject7 merged commit f9dbe5e into main May 6, 2026
4 checks passed
@realproject7 realproject7 deleted the task/1061-chart-polish branch May 6, 2026 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Airdrop chart: inside-chart left-aligned milestone labels, generic numbering, CMC prefix, smooth curve, font system [P0-4] CI Pipeline

1 participant