Enhancements
- Added
rightOffsetPixels
option toHorzScaleOptions
, allowing margin space from the right side of the chart to be set in pixels. This option takes precedence overrightOffset
and ensures consistent pixel offset when usingfitContent
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 whenaddTopLayer
is enabled (default: false)
(PR #1977)
- Added
autoScale
option 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
base
option 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: