v2.0.0
First major release. Highlights: a new metrics design-token prop, a uniform
feature-flag API, and a scrub-performance fix.
npm install react-native-livechart@2.0.0⚠️ Breaking changes — migrating from 1.x
LiveChartSeriesnow scrubs by default.scrubdefaulted tofalse; it now
defaults totrue, matchingLiveChart. Passscrub={false}to restore the
old behavior. (Legend taps are unaffected — chips sit outside the scrub gesture.)DotConfig.showis deprecated in favor ofdot={false}to hide the live
dot.dot={{ show: false }}still works and is equivalent — no rush to migrate.- Every overlay toggle now follows the same
boolean | Configconvention
(badge,gradient,pulse,valueLine,scrub,yAxis,xAxis,
leftEdgeFade,legend, and nowdot). This is additive for everything except
the two items above.
See the Migrating to v2 section in the README.
✨ Added
metricsprop on both charts — sizing & motion design tokens, the
geometry/feel analogue ofpalette. Namespaced (badge,candle,grid,
motion,emptyState) with per-key overrides, exposing previously-hardcoded
constants (badge pill geometry, candle body bounds, grid/axis fade and lerp
speeds, empty-state layout). New types:LiveChartMetrics,
LiveChartMetricsOverride, and the five namespace interfaces.dotaccepts a boolean on both charts (dot={false}to hide).
🐛 Fixed
- Crosshair overlays no longer emit React's "final argument changed size between
renders" error while scrubbing (a React Compiler × Reanimated auto-dependency
interaction; the affecteduseDerivedValues now use explicit deps).
⚡ Performance
- The line is decimated to ~2 points per horizontal pixel (min/max per pixel
column — envelope and volatility spikes preserved). Dense or wide time windows no
longer make per-frame work scale with sample count, fixing the sustained-scrub
frame drops on saturated windows. Sparse windows are unchanged.
📖 Documentation · 📦 npm · 📝 Full changelog