M
mebius
/
lib
Files
Code
Info
Chart arc geometry
charts-arcs
sectorPath: the ring segments of the radial, donut and gauge cards (angles in radians clockwise from 12 o'clock, around the centre of a square box), their corners rounded the way Figma rounds an arc's: a cubic that starts the corner radius along each edge, held to half the segment's length and width.
Chart number formatting
charts-format
formatCurrency (optionally without grouping), formatCurrencyParts, formatCompactCurrency (optionally with fixed digits), formatPercent (with optional fixed digits), formatNumber (counts and compact numbers), wholePercents (shares that add up to 100), formatDay and formatTime: cached Intl helpers the chart cards use for amounts, changes, axes, dates and animated counters.
Chart series geometry
charts-series
Geometry and scales for the chart cards: seriesToPixels, linePath, smoothPath (monotone curves) with smoothTangents and smoothCurveAt (its y at any x), areaPath, valueAt, alignPolylines (resamples two lines on the same x positions, straight or along a curve, so a period change can morph one into the other), polylineLengths, xAtLength and reachAt (where a line drawing itself in has got to, and when it reaches an x), roundCorners and edgeAt (Figma's corner radius on every vertex), niceTicks (linear axes), barTicks (axes from zero), timeTicks (UTC time axes), fittedDash (Figma's dash fitting), figmaGradientTransform (Figma's gradient matrix as an SVG gradientTransform), starPath and trianglePath (Figma's sparkles), seededRandom and bridgeWalk (repeatable sample data).
Select a component to view its code
Click on any item in the sidebar to get started
Select a component to view its information
Chart arc geometry
charts-arcs
sectorPath: the ring segments of the radial, donut and gauge cards (angles in radians clockwise from 12 o'clock, around the centre of a square box), their corners rounded the way Figma rounds an arc's: a cubic that starts the corner radius along each edge, held to half the segment's length and width.
Chart number formatting
charts-format
formatCurrency (optionally without grouping), formatCurrencyParts, formatCompactCurrency (optionally with fixed digits), formatPercent (with optional fixed digits), formatNumber (counts and compact numbers), wholePercents (shares that add up to 100), formatDay and formatTime: cached Intl helpers the chart cards use for amounts, changes, axes, dates and animated counters.
Chart series geometry
charts-series
Geometry and scales for the chart cards: seriesToPixels, linePath, smoothPath (monotone curves) with smoothTangents and smoothCurveAt (its y at any x), areaPath, valueAt, alignPolylines (resamples two lines on the same x positions, straight or along a curve, so a period change can morph one into the other), polylineLengths, xAtLength and reachAt (where a line drawing itself in has got to, and when it reaches an x), roundCorners and edgeAt (Figma's corner radius on every vertex), niceTicks (linear axes), barTicks (axes from zero), timeTicks (UTC time axes), fittedDash (Figma's dash fitting), figmaGradientTransform (Figma's gradient matrix as an SVG gradientTransform), starPath and trianglePath (Figma's sparkles), seededRandom and bridgeWalk (repeatable sample data).
Select a component to view its code
Click on any item in the sidebar to get started
Select a component to view its information