Skip to content

Charts: dashed pace for the month in progress; demo margins and two years - #17

Merged
lobbystack merged 2 commits into
mainfrom
month-pace-demo-data
Oct 8, 2026
Merged

lobbystack merged 2 commits into
mainfrom
month-pace-demo-data

Conversation

@lobbystack

Copy link
Copy Markdown
Owner

Two fixes for what people see when they open /demo from the Reddit post.

The month in progress runs dashed

Charts plotted the current month's amount so far, so on October 7 profit looked like it fell from $8.7k to $2.4k. The server now sends where the month lands at its pace so far (monthPace in overview.server.ts): synced lines scale by the share of the month that has passed, and flat costs count once. The chart ends the solid line at the last full month and draws a dashed segment to the pace. The tooltip on that point reads "Oct 2026, $2,390 so far" with "On pace for $9,339".

This covers the overview chart, the Costs chart, the Products sparklines and public product pages. MRR and subscriptions are snapshots, so they stay as they are. On the last day of a month the pace is null and the line is solid.

Demo data

  • Each product has its own share of costs: Draftly 80%, Shipmail 86%, Quoteflow 40% margin. Before, all three showed 76%.
  • The seed covers 24 months, so the year-earlier line has numbers instead of $0.

Checked

  • tsc, Biome and pnpm build pass.
  • monthPace against fixed dates: a past month gives null, 7 days of October scale by 31/7, flat costs are added once, and the last day gives null.
  • Production build with DEMO=on on October 7: overview (light), Costs and Products (dark), with the tooltip on the current month.

Each product gets its own share of costs, so the Products page shows
80%, 86% and 40% margins instead of the same figure three times. A
second year gives the charts a year-earlier line.
Charts plotted the current month's amount so far, so every line dropped
at the start of a month. The server now sends where that month lands at
its pace so far: synced lines scale to the whole month and flat costs
count once. The chart draws the last segment dashed to that value, and
the tooltip shows the amount so far. MRR and subscriptions are
snapshots and stay as they are.
@lobbystack
lobbystack merged commit 9e217b2 into main Oct 8, 2026
1 check passed
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.

1 participant