website/versioned_docs/version-5.0/release-notes.md
Enhancements
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)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)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)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)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)Bug Fixes
Plugin & Indicator Examples
Contributors
We'd like to thank our external contributors for their valuable contributions to this release:
Changes since the last published version.
Enhancements
addDefaultPane option to chart options, allowing creation of charts with no initial panesaddPane method to IChartApi for programmatically adding panessetPreserveEmptyPane and preserveEmptyPane methods to control empty pane behaviorgetStretchFactor and setStretchFactor methods to control relative pane sizesaddCustomSeries and addSeries methods to IPaneApi for creating series directly on a specific panegetHTMLElement to return null when a pane hasn't been created yetformatTickmarks method to IPriceFormatter interfacetickmarksPriceFormatter and tickmarksPercentageFormatter options to LocalizationOptionsBasetickmarksFormatter option to PriceFormatCustomChanges since the last published version.
Enhancements
IPriceScaleApi: setVisibleRange(range), getVisibleRange(), and setAutoScale(on). These methods allow for programmatic control of the visible price range on a price scale. Also added ensureEdgeTickMarksVisible option to PriceScaleOptions, which ensures tick marks are always visible at the very top and bottom of the price scale, providing clear boundary indicators. These features are particularly useful for charts with zooming and panning disabled that are primarily for display purposes. (PR #1856)zOrder option in the series markers plugin. This enhancement provides greater flexibility in controlling marker visibility and layering in complex charts. (PR #1876).Changes since the last published version.
Enhancements
ISeriesApi: seriesOrder() to get the current order index and setSeriesOrder(order) to set a specific order. (PR #1868)Changes since the last published version.
Bug Fixes
Changes since the last published version.
Improvements
atPriceTop, atPriceBottom, and atPriceMiddle, which require a price value to be specified. (PR #1826, thanks to @EranGrin)MagnetOHLC to CrosshairMode. This mode sticks the crosshair's horizontal line to the price value of a single-value series or to the open/high/low/close price of OHLC-based series. (PR #1831, thanks to @Jonney)Bug Fixes
Changes since the last published version.
Bug Fixes
Changes since the last published version.
Bug Fixes
Changes since the last published version.
Version 5.0.0 represents a significant milestone in the evolution of Lightweight Charts™, delivering on our commitment to keep the library truly "lightweight". Despite adding numerous new features, improvements, and fixes, we've managed to reduce the bundle size by up to 16%, bringing the base bundle size down to just 35kB. This remarkable reduction was achieved through enhanced tree-shaking capabilities, modernized architecture, and careful optimization of core features.
This release introduces highly requested features like multi-pane support and new chart types. It also modernizes the codebase and improves its architecture to set a foundation for future enhancements without compromising on size.
One of our most requested features, multi-pane support is now available. It allows you to create complex chart layouts with multiple independent viewing areas. This enhancement enables sophisticated technical analysis setups and better visualization of related data series. Additional key benefits include:
See Panes for more information.
Yield Curve Charts
Options Charts
See Chart types for more information about the Yield Curve Chart and Options Chart types.
TextWatermark and ImageWatermark)relativeGradient)maxBarSpacing)priceLines() method to ISeriesApi interfaceWe've prepared a comprehensive migration guide to help you upgrade from v4 to v5. Key areas to note:
See the full migration guide: Migrating from v4 to v5
This release uses ES2020 syntax and no longer supports CommonJS. If you need to support older environments, you'll need to set up transpilation for the lightweight-charts package in your build system using tools like Babel.
As always, we thank you for your support and help in making Lightweight Charts™ the best product on the financial web. We look forward to seeing what you build with these new capabilities!
You can always send us your feedback via GitHub. Happy trading!
Team TradingView
See changes since the last published version.
Minor Improvements
Bug Fixes
Changes since the last published version.
Minor Improvements
Bug Fixes
fixLeftEdge and fixRightEdge on the first render when both are true and data is added to an initially empty chart. Fixes issue #1356. (PR #1741)Changes since the last published version.
Bug Fixes
Changes since the last published version.
Enhancements
attributionLogo option to LayoutOptions. This feature displays the TradingView attribution logo on the main chart pane by default, helping users meet the library's licensing requirements for attribution.
attributionLogo option to false in the chart's layout option.OhlcData and SingleValueData. Introduced isFulfilledBarData for OhlcData and isFulfilledLineData for SingleValueData, ensuring more accurate validation of data types. Contributed by @mozeryansky (PR #1579, fixes #1526).Changes since the last published version.
Enhancements
Changes since the last published version.
Enhancements
Changes since the last published version.
Enhancements
IHorzScaleBehavior.shouldResetTickmarkLabels. (PR #1614)Changes since the last published version.
Bug Fixes
zOrder set to top from drawing above the last price animation. (PR #1576)Changes since the last published version.
Minor Improvements
Bug Fixes
Changes since the last published version.
Bug Fixes
Minor Improvements
Changes since the last published version.
Bug Fixes
shiftVisibleRangeOnNewBar behaviour for realtime updates to a series. Additionally, a new option allowShiftVisibleRangeOnWhitespaceReplacement has been added if you wish to have the old 4.0 behaviour for when new data replaces existing whitespace. (PR #1444)vertTouchDrag or horzTouchDrag setting in the handleScroll options, any touch scroll events over the corresponding scale will now be ignored so the page can be scrolled. (PR #1445)Changes since the last published version.
Version 4.1 of Lightweight Charts introduces exciting new features, including the introduction of Plugins, which provide developers the ability to extend the library's functionality. Additionally, this release includes enhancements to customize the horizontal scale and various minor improvements and bug fixes.
Major Updates
Plugins
Developers can now leverage the power of Plugins in Lightweight Charts. Two types of Plugins are supported - Custom Series and Drawing Primitives, offering the ability to define new series types and create custom visualizations, drawing tools, and annotations.
With the flexibility provided by these plugins, developers can create highly customizable charting applications for their users.
To get started with plugins, please refer to our Plugins Documentation for a better understanding of what is possible and how plugins work. You can also explore our collection of plugin examples (with a preview hosted here) for inspiration and guidance on implementing specific functionality.
To help you get started quickly, we have created an NPM package called create-lwc-plugin, which sets up a plugin project for you. This way, you can hit the ground running with your plugin development.
Horizontal Scale Customization
The horizontal scale is no longer restricted to only time-based values. The API has been extended to allow customization of the horizontal scale behavior, and enable uses cases like options chart where price values are displayed in the horizontal scale. The most common use-case would be to customise the tick marks behaviour.
The createChartEx function should be used instead of the usual createChart function, and an instance of a class implementing IHorzScaleBehavior should be provided.
A simple example can be found in this test case: horizontal-price-scale.js
Enhancements
setCrosshairPosition API, allowing programmatic setting of the crosshair position. (fixes #1198, #1163, #438) DocsHidden option in the CrosshairMode setting. (closes #749, thanks to @luk707)tickMarkMaxCharacterLength option. (closes #1396) DocspaneSize getter to IChartApi, returning the dimensions of the chart pane. (issue #1411) DocsBug Fixes
autoSize after disabling it. (PR #1274)Thanks to our Contributors for this Release:
You can always send us your feedback via GitHub. We look forward to hearing from you! And as always, happy trading!
Team TradingView
See issues assigned to this version's milestone or changes since the last published version.
Enhancements
autoSize is active, and added API to check if active. #1301Bug fixes
autoSize chart option is enabled. Thanks @victorbrambati. #1271 #1281autosize doesn't show the latest bars. Thanks @victorbrambati #1281. #1282As always, we thank you for your support and help in making Lightweight Charts™ the best product on the financial web. And a big shout out to our hero contributors @victorbrambati, and @UcheAzubuko!
You can always send us your feedback via GitHub.
We look forward to hearing from you! And as always, happy trading! Team TradingView
See issues assigned to this version's milestone or changes since the last published version.
Long overdue as it’s been nearly 1 year since our last major update, but behold before all the changes that have happened over the last 12 months.
In total, more than 20 tickets have been addressed with one of the most important ones being fancy-canvas – the library we use to configure HTML canvas in Lightweight Charts™.
Please view the migration guide here: Migrating from v3 to v4.
Breaking changes
ticksVisible to TimeScaleOptions, renamed drawTicks to ticksVisible in PriceScaleOptions.ISeriesApi.markersISeriesApi.dataByIndexTimeEnhancements
Chores
Bug fixes
As always, we thank you for your support and help in making Lightweight Charts™ the best product on the financial web. And a big shout out to our hero contributors thanhlmm, CommanderRoot, samhainsamhainsamhain & colleague Nipheris! You can always send us your feedback via GitHub. We look forward to hearing from you! And as always, happy trading! Team TradingView
See issues assigned to this version's milestone or changes since the last published version.
We're happy to announce the next release of Lightweight Charts™ library. This release includes many improvements and bug fixes (as usual), but we are thrilled to say that from this version the library has its own documentation website that replaces the documentation in the repository. Check it out and share your feedback in this discussion thread.
Enhancement
Fixed
Thanks to our contributors:
See issues assigned to this version's milestone or changes since the last published version.
Enhancement
Fixed
Thanks to our contributors:
See issues assigned to this version's milestone or changes since the last published version.
Fixed
LasPriceAnimationMode const enum (Last without t), which was fixed in this release. The incorrect name is still available to import and could be used in your code so no breaking change so far (see e5133cb0c50fc557182aba4011e170aaf30a5b1a)See changes since the last published version.
On this day 10 years ago, 10th September 2011, the very first version of the TradingView website was deployed. To celebrate 10th anniversary we're happy to announce the new version of lightweight-charts library v3.6.0 🎉🎉🎉
Enhancement
Fixed
Error: Value is null error while set the data is container has 0x0 size (see #821)Thanks to our contributors:
See issues assigned to this version's milestone or changes since the last published version.
A note about rendering order of series, which might be interpret as a bug or breaking change since this release
This is not really a breaking change, but might be interpret like that. In #794 we've fixed the wrong order of series, thus now all series will be displayed in opposite order (they will be displayed in order of creating now; previously they were displayed in reversed order).
To fix that, just change the order of creating the series (thus instead of create series A, then series B create series B first and then series A) - see #812.
Fixed
Thanks to our contributors:
See issues assigned to this version's milestone or changes since the last published version.
Enhancement
Fixed
to date of getVisibleRange contains partially visible data item and it's impossible to hover it (see #624)See issues assigned to this version's milestone or changes since the last published version.
Enhancement
setData (see #584)Fixed
Thanks to our contributors:
See issues assigned to this version's milestone or changes since the last published version.
Enhancement
Fixed
Infra and dev env
Thanks to our contributors:
See issues assigned to this version's milestone or changes since the last published version.
It's a just re-published accidentally published 3.1.4 version, which didn't actually fix the issue #536.
Version 3.1.4 has been deprecated.
Fixed
_internal_priceScale is not a function while getting series price scale (see #536)See issues assigned to this version's milestone or changes since the last published version.
Fixed
handleScroll and handleScale options aren't applied (see #527)See issues assigned to this version's milestone or changes since the last published version.
Fixed
See issues assigned to this version's milestone or changes since the last published version.
Fixed
See issues assigned to this version's milestone or changes since the last published version.
Enhancement
Fixed
ReferenceError (see #446)Undocumented breaking changes
We know that some of users probably used some hacky-workarounds calling internal methods to achieve multi-pane support. In this release, to reduce size of the bundle we dropped out a code for pane's separator (which allows to resize panes).
As soon this workaround is undocumented and we don't support this feature yet - we don't bump a major version. But we think it's better to let you know that it has been changed.
Development
Thanks to our contributors:
See issues assigned to this version's milestone or changes since the last published version.
Fixed
overlay: true in series options while create series to backward compat (see #475)See issues assigned to this version's milestone or changes since the last published version.
Breaking changes
We have some breaking changes since the latest version due some features and API improvements:
subscribeVisibleTimeRangeChange and unsubscribeVisibleTimeRangeChange has been moved from ChartApi to TimeScaleApiSee breaking changes doc with migration guide to migrate smoothly.
Enhancement
Added
Fixed
series.setMarkers requires at least one data point (see #372)Thanks to our contributors:
See issues assigned to this version's milestone or changes since the last published version.
Breaking changes
lineWidth property from HistogramStyleOptions interface (it affects nothing, but could break your compilation)width and height args in resize method (#157)Enhancement
Added
Fixed
fitContent (#345)Thanks to our contributors:
See issues assigned to this version’s milestone or changes since the last published version.
Fixed
Added
Fixed
lineType option does not work for area/line series (#220)See issues assigned to this version’s milestone or changes since the last published version.
Added
ts-transformer-minify-privates transformer (#98)Fixed
value is provided (#165)Thanks to our contributors:
See issues assigned to this version’s milestone or changes since the last published version.
Fixed
Fixed
The first release.
The docs for this version are available here.