Releases: tradingview/lightweight-charts
v4.2.0
Enhancements
- Added new
attributionLogo
option toLayoutOptions
. This feature displays the TradingView attribution logo on the main chart pane by default, helping users meet the library's licensing requirements for attribution.- The TradingView attribution logo can be easily hidden by setting the
attributionLogo
option tofalse
in the chart'slayout
option.
- The TradingView attribution logo can be easily hidden by setting the
- Improved data validation for
OhlcData
andSingleValueData
. IntroducedisFulfilledBarData
forOhlcData
andisFulfilledLineData
forSingleValueData
, ensuring more accurate validation of data types. Contributed by @mozeryansky (PR #1579, fixes #1526).
v4.1.7
Enhancements
- Further Refinement of the Price Scale Label Alignment. (PR #1630)
v4.1.6
v4.1.5
Enhancements
- Added
IHorzScaleBehavior.shouldResetTickmarkLabels
. (PR #1614)
4.1.4
Bug Fixes
- Fixed hoveredSeries being undefined during series removal and creation. (PR #1529, fixes #1406, fixes #1499)
- Fixed price label rendering artefact. (PR #1585, fixes #1584)
- Fixed an issue that prevented primitives with
zOrder
set totop
from drawing above the last price animation. (PR #1576) - Fixed possible ReDos. (PR #1536)
- Fixed marker positioning, which could cause a space between histogram and bottom of the chart. (PR #1538 & #1539, fixes #1382)
4.1.3
4.1.2
4.1.1
- Fixed
shiftVisibleRangeOnNewBar
behaviour for realtime updates to a series. Additionally, a new optionallowShiftVisibleRangeOnWhitespaceReplacement
has been added if you wish to have the old 4.0 behaviour for when new data replaces existing whitespace. (PR #1444) - When disabling touch scrolling on the chart via either the
vertTouchDrag
orhorzTouchDrag
setting in thehandleScroll
options, any touch scroll events over the corresponding scale will now be ignored so the page can be scrolled. (PR #1445)
4.1.0
Intro
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
Changelog
Enhancements
- Added point markers styling option for line-based series. (closes #365) Docs
- Added double click subscriber for the main chart pane. (closes #1385) Docs
- Added
setCrosshairPosition
API, allowing programmatic setting of the crosshair position. (fixes #1198, #1163, #438) Docs - Added an option to disable crosshair. Introduced the
Hidden
option in the CrosshairMode
setting. (closes #749, thanks to @luk707) Docs - Allow overriding tick mark label length via the
tickMarkMaxCharacterLength
option. (closes #1396) Docs - Support for overriding the percentage formatter within the localization options. (fixes #1328, #1291) Docs
- Added
paneSize
getter toIChartApi
, returning the dimensions of the chart pane. (issue #1411) Docs - Added options to set minimum dimensions for the price and time scales. (closes #1062, related to #1163, #50) Docs, Docs
Bug Fixes
- Fixed chart layout when direction is set to RTL. (PR #1338)
- Fixed re-enabling of
autoSize
after disabling it. (PR #1377) - Corrected percentage mode and zero first value. (fixes #1386)
- Prevent chart shifting when new data replaces existing whitespace. (fixes #1201)
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.
4.0.1
Enhancements
- Add the ability to specify font colour for the Priceline labels. #1274 #1287
- Ignore resize method if
autoSize
is active, and added API to check if active. #1301
Bug fixes
- Typo in customization guide. Thanks @UcheAzubuko. #1284
- Inability to immediately add markers when
autoSize
chart option is enabled. Thanks @victorbrambati. #1271 #1281 - First render when using
autosize
doesn't show the latest bars. Thanks @victorbrambati #1281. #1282 - Series rendering bug when outside of visible range. #1293 #1294
- Auto contrast text color for crosshair labels. #1309 #1310
- Hit box from the text of marker incorrectly shifted to the right. #1270 #1305
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 @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.