npm / lightweight-charts
lightweight-charts
What changed in lightweight-charts 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
1 breaking12 new APIs and options2 performance1 behavior and defaults2 tooling8 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initlightweight-charts 526 changes
Breaking changes 1
Markers larger than size 1 are no longer re-clamped to 30px in the renderer, so shapes scale with size and arrow tips remain aligned with the anchor price.
New APIs and options 12
Adds a chart option to choose which visible price scale is preferred by default when both left and right scales are available; defaults to right.
Adds hovered-series and associated object metadata to mouse event payloads.
Adds an option, defaulting to true, that renders the currently hovered series above other series in the same pane.
Adds hovered-series and associated object metadata to mouse event payloads.
Custom series can opt in to hit testing with an optional hook; a geometry-based fallback is used when it is not provided.
Adds control over price-scale tick mark label density; higher values mean more spacing and fewer tick marks, and lower values mean less spacing and more tick marks. Defaults to 2.5.
Adjusts the zoom level threshold for conflation activation and can create smoothing effects.
When enabled, the crosshair snaps to the nearest visible series data point instead of snapping to hidden series indices.
Plugin developers can implement custom aggregation logic through this interface.
Enables or disables data conflation; it is disabled by default.
Pre-calculates conflated data on initialization to improve zoom performance, at the cost of initial load time and memory usage; defaults to false.
Controls background computation priority when using the Prioritized Task Scheduling API; defaults to 'background'.
Performance 2
Improves performance on charts combining series markers with large datasets by avoiding cloning the entire series dataset on every mouse move.
When enabled, conflation merges data points when zoomed out to improve rendering performance for large datasets.
Behavior and default changes 1
When enabled, hovering an Area or Baseline series renders its stroke, point markers, and price lines on a top layer while the fill stays at its natural z-order.
Tooling 2
Adds an Agent Skill that teaches AI coding assistants Lightweight Charts v5 API conventions, mental models, and common foot-guns.
Each push to master publishes a compact preview package, making unreleased changes easier to test.
Fixes and other changes 8
Resets the provider when explicitly set back to undefined via applyOptions, restoring autoscaling after a custom provider was used.
Prevents a Value is null error when replacing multiple series with shorter datasets while the crosshair hovers over data by invalidating affected pane views before time scale changes.
Fixes visual jitter when auto-sized charts are resized within dynamic containers; ResizeObserver-triggered resize behavior now paints synchronously.
Dash phase remains continuous when a series changes stroke color per data item, preventing dash patterns from restarting at color boundaries.
Fixes point markers not being drawn correctly when per-point colors change.
Fixes a visual bug where a pane's DOM element could remain on screen after removing its last series when that series contained large values.
The time scale method now respects the rightOffset option when rightOffsetPixels is not set.
Price axis label positioning no longer treats plugin views without this optional method as positioned at coordinate 0, avoiding false overlap detection.