
From Static to Real-Time: Data Viz with st-core.fscss (Pure CSS Charts)
This is a follow-up to my earlier post ( Building a trading dashboard UI with zero JavaScript — just st-core.fscss. )If you haven't read that one, the quick summary: st-core is an FSCSS plugin that lets you declare chart infrastructure — fills, lines, dots, axes, grids — entirely at the CSS layer. No canvas, no chart library. That post showed you the static side. This one shows you how to make it live. The "Aha" Moment The thing that unlocks st-core for real data viz is understanding what the chart actually is under the hood. The chart shape IS a clip-path polygon. When st-core compiles your FSCSS, it generates CSS that reads from a set of custom properties — --st-p1 through --st-p8 — and uses them to construct the polygon coordinates. That's it. So updating the chart at runtime is just: element . style . cssText = `--st-p1: 40%; --st-p2: 75%; --st-p3: 55%; ...` ; One line. No DOM surgery. No re-render cycle. The CSS transition handles the rest. The Demo: Expenses Chart Here's the full
Continue reading on Dev.to
Opens in a new tab



