github tradingview/lightweight-charts v5.2.0

10 hours ago

Enhancements

  • Added hoveredSeriesOnTop option (default: true) that renders the currently hovered series above other series in the same pane. (PR #2076)
  • Added series hit testing for built-in and custom series. Mouse event payloads now include hoveredItem and hoveredTarget, exposing the hovered series and associated object metadata. Built-in line-like, range-like, and composite renderers all support hit testing, while custom series can opt in via an optional ICustomSeriesPaneRenderer.hitTest() hook (a geometry-based fallback is used when the hook isn't provided). (PR #2076)
  • Added defaultVisiblePriceScaleId chart option to control which visible price scale ('left' or 'right') is preferred as the default when both are available. Defaults to 'right'. (PR #2079)
  • Added tickMarkDensity option to price scale options, providing control over tick mark label density. A higher value results in more spacing between tick marks and fewer tick marks; a lower value results in less spacing and more tick marks. Defaults to 2.5. (PR #2050)
  • Improved dashed and dotted line rendering so that the dash phase remains continuous when a series changes stroke color per data item. Previously, dash patterns would restart at each color boundary, producing visual discontinuities. (PR #2067)

Bug Fixes

  • Fixed line series point markers not being drawn correctly when per-point colors change. (PR #2064, fixes #2017)
  • Fixed a visual bug where a pane's DOM element could persist on screen after removing the last series from that pane via removeSeries() when the series contained large values. (PR #2063)
  • Fixed visual jitter that occurred when charts with autoSize enabled were resized within dynamic containers. Resize behaviour triggered by ResizeObserver now paints synchronously, avoiding the timing mismatch with container resize. (PR #2055, contributed by @DarrenHaba)
  • Fixed the description of the timeToIndex() method. (PR #2072)

Development

  • Added continuous preview releases from the master branch via pkg.pr.new. Each push to master now publishes a compact preview package, making it easier to test unreleased changes. See the README for installation instructions. (PR #2053)

Contributors

We'd like to thank our external contributors for their valuable contributions to this release:

Changes since the last published version.

Don't miss a new lightweight-charts release

NewReleases is sending notifications on new releases.