Finally Shipped st-core.fscss v2 β€” CSS Charts Without the 8-Point Ceiling

Finally Shipped st-core.fscss v2 β€” CSS Charts Without the 8-Point Ceiling

●1 ●6 ●35
calendar_today ago β€’ schedule2 min read

For a while, st-core.fscss charts had one annoying limit: every line, fill, and dot was locked to exactly 8 data points. --st-p1 through --st-p8, hardcoded. Want to plot 12 weeks of revenue? Tough. Want 5 points for a quick demo? You'd pad the array with zeros and hope nobody noticed.

v2 gets rid of that.

The core change: Array (@arr)

Instead of passing 8 raw numbers into @st-chart-points, you now declare a named array of any length:

@arr myData[50, 10, 97, 35, 66, 50, 80, 54, 70, 60]

@st-chart-fill(.chart-fill, myData)
@st-chart-line(.chart-line, myData)

st-core reads the array length at compile time, works out even X-spacing across the chart width, and builds the clip-path: polygon() shape from however many points you gave it. 5 points, 12 points, 50 points, doesn't matter. No more counting to 8.

The gotcha that took me a minute to internalize

Here's the part that actually tripped me up while building the multi-series examples: @st-chart-line(selector, array) and @st-chart-fill(selector, array) aren't what set the data on an element. They declare the renderer for that selector, the array argument just tells it how many points to expect.

The thing that actually writes --st-p1…--st-p{n} onto an element is @st-chart-points(array).

That distinction matters the moment you have more than one series on a chart. In a multi-line setup, if .line-b doesn't call @st-chart-points(seriesB) itself, it silently inherits whatever the parent container set, meaning it renders the wrong dataset. Looks fine at a glance, wrong shape in practice. Caught it while building a 3-series dashboard card where two lines were quietly drawing the same data.

.fill-b {
  @st-chart-points(seriesB)   /* required, not optional */
  opacity: 0.3;
  --st-accent: #4fffb0;
}

Once that clicked, the mental model got simple: renderer declarations are structural (once per selector), point data is per-element (as many times as you have distinct series).

How it feels to ship

Pure CSS charting was already a fun constraint to design inside of, no JS runtime, no SVG, no canvas. Making the dataset size flexible removes the last thing that made it feel like a toy rather than something you'd reach for on a real dashboard. Compiled output is still under a kilobyte. Still zero hydration.

Docs and full examples are up in the repo, including the legacy v1 reference for anyone still on fixed 8-point charts.

Repo: github.com/fscss-ttr/st-core.fscss

Open-source

with β™₯️

The source code is totally math notebook πŸ˜…

Have been writing and debugging from morning till night, and finally released it. The usage is now as simple as CSS.

😊

2 Comments

1 vote
0
πŸ”₯ Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

TypeScript Complexity Has Finally Reached the Point of Total Absurdity

Karol Modelski - Apr 23

Core Web Vitals Benchmarks for Shopify Stores (2026 Data)

ApogeeWatcherverified - Sep 16

Your Tech Stack Isn’t Your Ceiling. Your Story Is

Karol Modelski - Apr 9

The Sovereign Vault β€” A Comprehensive Guide to Protocol-Driven AI

Ken W. Algerverified - Jun 4

Designing Stats UIs with FSCSS and st-core

Figsh - Apr 4
chevron_left
1.3k Points β€’ 42 Badges
16Posts
10Comments
11Connections
A full-stack web developer: Building smart solutions, designing meaningful experiences, and continuo... Show more

Related Jobs

View all jobs β†’

Commenters (This Week)

13 comments
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!