# What changed in lightweight-charts

> 26 changes in lightweight-charts 5 from its official release notes, upgrade guides and advisories: 1 breaking, 12 new APIs and options. Each one cited. Sources checked 2026-10-19. HTML: https://unstale.sh/npm/lightweight-charts/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## lightweight-charts 5

### Breaking changes

- 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. (5.2.1) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.2.1)

### New APIs and options

- 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. (5.2.0) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.2.0)
- Adds hovered-series and associated object metadata to mouse event payloads. (5.2.0) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.2.0)
- Adds an option, defaulting to true, that renders the currently hovered series above other series in the same pane. (5.2.0) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.2.0)
- Adds hovered-series and associated object metadata to mouse event payloads. (5.2.0) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.2.0)
- Custom series can opt in to hit testing with an optional hook; a geometry-based fallback is used when it is not provided. (5.2.0) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.2.0)
- 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. (5.2.0) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.2.0)
- Adjusts the zoom level threshold for conflation activation and can create smoothing effects. (5.1.0) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.1.0)
- When enabled, the crosshair snaps to the nearest visible series data point instead of snapping to hidden series indices. (5.1.0) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.1.0)
- Plugin developers can implement custom aggregation logic through this interface. (5.1.0) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.1.0)
- Enables or disables data conflation; it is disabled by default. (5.1.0) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.1.0)
- Pre-calculates conflated data on initialization to improve zoom performance, at the cost of initial load time and memory usage; defaults to false. (5.1.0) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.1.0)
- Controls background computation priority when using the Prioritized Task Scheduling API; defaults to 'background'. (5.1.0) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.1.0)

### Performance

- Improves performance on charts combining series markers with large datasets by avoiding cloning the entire series dataset on every mouse move. (5.2.1) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.2.1)
- When enabled, conflation merges data points when zoomed out to improve rendering performance for large datasets. (5.1.0) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.1.0)

### Behavior and default changes

- 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. (5.2.1) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.2.1)

### Tooling

- Adds an Agent Skill that teaches AI coding assistants Lightweight Charts v5 API conventions, mental models, and common foot-guns. (5.2.1) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.2.1)
- Each push to master publishes a compact preview package, making unreleased changes easier to test. (5.2.0) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.2.0)

### Fixes and other changes

- Resets the provider when explicitly set back to undefined via applyOptions, restoring autoscaling after a custom provider was used. (5.2.1) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.2.1)
- 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. (5.2.1) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.2.1)
- Fixes visual jitter when auto-sized charts are resized within dynamic containers; ResizeObserver-triggered resize behavior now paints synchronously. (5.2.0) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.2.0)
- Dash phase remains continuous when a series changes stroke color per data item, preventing dash patterns from restarting at color boundaries. (5.2.0) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.2.0)
- Fixes point markers not being drawn correctly when per-point colors change. (5.2.0) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.2.0)
- 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. (5.2.0) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.2.0)
- The time scale method now respects the rightOffset option when rightOffsetPixels is not set. (5.1.0) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.1.0)
- Price axis label positioning no longer treats plugin views without this optional method as positioned at coordinate 0, avoiding false overlap detection. (5.1.0) — [release notes](https://github.com/tradingview/lightweight-charts/releases/tag/v5.1.0)
