resolveFluentSparklineStyle function
The derived defaults for a sparkline, before any theme or widget override.
Every literal here is transcribed from Sparkline.tsx and
useSparklineStyles.styles.ts; the citing comment on each field of
FluentSparklineStyle is the authority.
Implementation
FluentSparklineStyle resolveFluentSparklineStyle(FluentThemeData theme) =>
FluentSparklineStyle.from(
// Sparkline.tsx:94.
lineStrokeWidth: 2,
// Sparkline.tsx:101.
areaFillOpacity: 0.2,
// Sparkline.tsx:21-26 — margin.top.
topMargin: 2,
// Sparkline.tsx:114 — the render gate.
minRenderSize: const Size(50, 16),
// Sparkline.tsx:128 — dx.
labelDx: 8,
// Sparkline.tsx:128 — dy, measured up from y="100%".
labelBaselineFromBottom: 5,
labelTextStyle: theme.typography.caption1.copyWith(
color: theme.colors.neutralForeground1,
),
);