github tradingview/lightweight-charts v5.0.9

13 hours ago

Enhancements

  • Added rightOffsetPixels option to HorzScaleOptions, allowing margin space from the right side of the chart to be set in pixels. This option takes precedence over rightOffset and ensures consistent pixel offset when using fitContent on charts with different amounts of data. The pixel-based offset remains consistent during zoom operations. (PR #1957)
  • Added pop method to series API that removes a specified number of data points from the end of the series and returns the removed data. (PR #1949, fixes #1518, contributed by @tpunt)
  • Enhanced takeScreenshot method with two new optional parameters:
    • addTopLayer - includes top layer primitives in the screenshot (default: false)
    • includeCrosshair - includes the crosshair when addTopLayer is enabled (default: false)
      (PR #1977)
  • Added autoScale option to SeriesMarkersOptions, allowing control over whether markers are included in the auto-scaling calculation of the price scale. When enabled (default: true), the chart will adjust its scale to ensure markers are fully visible. (PR #1940, contributed by @zbinlin)
  • Added base option to price format configuration as an alternative to minMove. This helps avoid floating-point precision limitations when dealing with extremely small price movements. (PR #1952)
  • Enhanced plugin API with additional functionality:
    • Added lastValueData() method to the public series API
    • Exposed setLineStyle drawing utility through a new DrawingUtils interface
      (PR #1956, contributed by @tpunt)

Bug Fixes

  • Fixed price scale visible range calculation when in logarithmic scale mode by properly converting the range from log space and handling precision issues with rounding. (PR #1965, contributed by @tpunt)

Plugin & Indicator Examples

  • Added Dual Range Histogram Series custom plugin example that visualizes paired positive and negative value ranges for each time point using a column-based display. (PR #1934)
  • Added Pretty Histogram plugin example demonstrating non-standard histogram rendering. (PR #1930)
  • Added examples demonstrating how to implement indicators (studies) within Lightweight Charts. See the Analysis Indicators tutorial for more information. (PR #1915)

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.