Performant financial charts built with HTML5 canvas
Minor Improvements
Bug Fixes
Bug Fixes
Minor Improvements
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)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.
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.
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
setCrosshairPosition
API, allowing programmatic setting of the crosshair position. (fixes #1198, #1163, #438) Docs
Hidden
option in the CrosshairMode
setting. (closes #749, thanks to @luk707) Docs
tickMarkMaxCharacterLength
option. (closes #1396) Docs
paneSize
getter to IChartApi
, returning the dimensions of the chart pane. (issue #1411) Docs
autoSize
after disabling it. (PR #1377)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. #1301
Bug fixes
autoSize
chart option is enabled. Thanks @victorbrambati. #1271 #1281
autosize
doesn't show the latest bars. Thanks @victorbrambati #1281. #1282
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.
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.
And before you leave to download our new exciting version, keep an eye out for the next version of master that would later become 4.1. We don’t want to spoil the magic, but you’ll soon enough be able to customise even more of the chart thanks to a brand new … no! I can’t say it. You’ll have to wait :)
Without further ado, let us introduce to you our newly refreshed landing page for the documentation. It’s clearer and straight to the point – which is exactly what developers are after.
One of the most important updates is fancy canvas, moving from v1.0.1 to v2.1.0.
We have finally renewed our rendering architecture to support pixel-perfect rendering in modern browsers. The new box measurement called devicePixelContentBox started to appear recently in some browser implementations. It enables requesting HTML canvas dimensions in physical pixels, that, in turn, allows to perform "true" pixel-perfect rendering at any page zoom or pixel density, without wild-guess approaches to determine canvas bitmap' size. And the new release of fancy-canvas adopts this new approach, introducing some abstractions to support the idea.
We have introduced the possibility to draw curved lines using Beziers curves.
We’ve also added the possibility of customising the colours for different parts of an area series.
With this improvement, not only does the chart get the proper size at initialisation, but also every time it’s resized. Such behaviour could be encountered when rotating a phone or tablet or when resizing the chart on a website.
We’ve also fixed some nasty bugs!
When setting the price scale mode to anything other than 'Normal', the price for PriceLine wasn't properly calculated. That’s all in the past now!
On some occasions, when a user was trying to reset the time scale while another action was taking place, some nasty glitches were noticeable on the chart.
Before integrating any pull request submitted on GitHub we run a series of tests to check not only various parts of the UI but also to check for memory leaks.
Up until now we were solely relying on Puppeteer but have now integrated memlab from Meta. It helps us find Javascript objects that are not cleaned when they should, which could lead to some unexpected behaviours.
Below is the list of all changes that happened in the library.
Please view the migration guide here: Migrating from v3 to v4.
ticksVisible
to TimeScaleOptions
, renamed drawTicks
to ticksVisible
in PriceScaleOptions
.ISeriesApi.markers
ISeriesApi.dataByIndex
Time
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.
Thanks to our contributors:
See issues assigned to this version's milestone or changes since the last published version.
Thanks to our contributors:
See issues assigned to this version's milestone or 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 🎉🎉🎉
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.