Enhancements
- Added
rightOffsetPixelsoption toHorzScaleOptions, allowing margin space from the right side of the chart to be set in pixels. This option takes precedence overrightOffsetand ensures consistent pixel offset when usingfitContenton charts with different amounts of data. The pixel-based offset remains consistent during zoom operations. (PR #1957) - Added
popmethod 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
takeScreenshotmethod with two new optional parameters:addTopLayer- includes top layer primitives in the screenshot (default: false)includeCrosshair- includes the crosshair whenaddTopLayeris enabled (default: false)
(PR #1977)
- Added
autoScaleoption toSeriesMarkersOptions, 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
baseoption to price format configuration as an alternative tominMove. This helps avoid floating-point precision limitations when dealing with extremely small price movements. (PR #1952) - Enhanced plugin API with additional functionality:
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: