Skip to main content
Version: 4.0

Release Notes

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

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.

4.0.0

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

  • Fancy-canvas 2 | #818
  • Added support for ES module exports | #613
  • We are now generating two more build types: esm, standalone & cjs
  • Updated scales design | #606
    • Changed scales look & feel according to the new design
  • Add possibility to disable time axis ticks | #1043
  • Added ticksVisible to TimeScaleOptions, renamed drawTicks to ticksVisible in PriceScaleOptions.
  • Custom price lines should be atop of the series | #684
    • Price line to be added on top of any series - shout out to thanhlmm
  • Remove deprecated code | #626
  • Fix types inconsistency on API level with time | #470
  • Add API to get chart values (data, markers, etc) | #414
    • Added methods:
      • ISeriesApi.markers
      • ISeriesApi.dataByIndex
    • Changed time types everywhere in the public API to Time

Enhancements

  • Handle resize with ResizeObserver if it's exist in window | #71
    • There was an issue when resizing the chart (such as rotating the screen of a phone/tablet).
  • Add possibility to use default tick mark formatter implementation as a fallback | #1210
    • Allow the custom tick mark formatter to return null so that it will use the default formatter for that specific mark.
  • Add possibility to invert Area series filled area | #1115
    • Adds invertFilledArea property to the AreaStyleOptions which when set to true will invert the filled area (draw above the line instead of below it).
  • Documentation website improvements | #1001 #1002
    • Provides a way to apply theme-based colors to a chart whenever the Docusaurus theme is changed.
  • Add ability to draw parts of area with different colors | #1100
    • Add a possibility to change line, top and bottom colors for the different parts of an area series
  • Add possibility to change price axis text color | #1114
  • Reset price and time scale double click options | #1118
    • Distinguishing the reset between price & time scale vs having only one option
  • Add curved lines | #506
    • Add a new line type that draws curved lines between series points.

Chores

  • Replace deprecated String.prototype.substr | #1048
    • Shout out to CommanderRoot

Bug fixes

  • Refactoring resize the chart | #367
  • The chart is blank on printed page in Chromium | #873
    • Chart was blank when printing
  • Horizontal scroll animations improvements | #1136
    • Fixes glitches when resetting the chart time scale while scrolling
  • Draw series last price & price line labels on the top layer | #1046
    • Fixes an issue where price line could be place over price scale labels
  • Incorrect price line labels formatting | #1032
    • When setting the price scale mode to anything than 'Normal' the price for PriceLine wasn't properly calculated.
  • lockVisibleTimeRangeOnResize does not work with fixLeftEdge | #991
    • The visible range is no longer changed after resizing the chart.
  • Crosshair label text appears on the chart during initial render | #1255
    • Small text artefacts from the crosshair no longer appear on the time axis before any interaction with the chart.

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.

3.8.0

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

  • Documentation website (see #875, #918, #411, #919, #922, #983, #980, #1006)
  • Quick tracking mode (see #830)
  • Improved mouse behaviour on touch devices (like mouse connected to mobile phone/tablet) (see #106)
  • Custom color for items of candlestick and line series (see #195)
  • Labels might be cut off when disabling scale and scroll (#947)
  • Add ability to disable visibility of price line line (see #969)

Fixed

  • timeScale.fitContent is not working correctly (see #966)
  • Delegate.unsubscribeAll method works in opposite way (see #995)
  • Last price animation is active when no data added to the right (but to the left) (see #886)
  • subscribeClick on mobile always get the last index of all the items (see #657)
  • Incorrect crosshair position on scrolling by dragging by mouse (see #987)
  • A painting slows down after a while with tons of updates (see #946)
  • Bars disappear with devicePixelRatio less than 1 (see #982)
  • There are no tick marks on the price axis (see #939)
  • Disabling scrolling by disabled horzTouchDrag and vertTouchDrag options disables moving crosshair in tracking mode (see #434)
  • Reducing precision doesn't update price scale width (see #550)
  • Chart width is jumping on series change from area to candles (see #943)
  • Log axis is not scaling on small number (see #874)
  • Overlay series title is not rendered when no series use right price scale (see #926)
  • scrollToPosition with big negative value and when no data breaks the chart (see #889)
  • When rendering multiple charts with baseline series, baseValue of the last element is used on all charts series. (see #898)

Thanks to our contributors:

See issues assigned to this version's milestone or changes since the last published version.

3.7.0

Enhancement

  • The new baseline series chart (see #151)
  • Documentation about time zones support (see #781)
  • Added methods to get time axis size and subscribe on size change (see #853)
  • Improved performance of setting/updating series data (see #418 and #838)
  • Use lowerbound in TimeScale timeToIndex search (see #767)
  • Add JSDoc comments for existing API docs (see #870)

Fixed

  • Increased min price tick mark step up to 1e-14 (from 1e-9) (see #841)
  • Fix typo in customization docs (see #844)
  • Do not paint time axis if it not visible (see #865)
  • Remove color customisation from settings.json (see #869)

Thanks to our contributors:

See issues assigned to this version's milestone or changes since the last published version.

3.6.1

Fixed

  • In v3.6.0 there was a typo in 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.

3.6.0

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

  • Gradient chart background color (see #831)
  • How to add buffer animation to price jump (see #567)
  • Kinetic scroll (see #832)

Fixed

  • Incorrect initial barSpacing when both fixRightEdge and fixLeftEdge are enabled (see #823)
  • Time axis label get cut on the edge if a fix edge option is enabled (see #835)
  • Price axis doesn't respect the width of crosshair label (see #834)
  • Fixed both timescale edges make lockVisibleTimeRangeOnResize turn wrong (see #814)
  • 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.

3.5.0

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

  • Screenshot output missing piece on bottom right (see #798)
  • Overlapped line chart show wrong color order when hover (see #794)
  • Price line label show on both axis (see #795)

Thanks to our contributors:

See issues assigned to this version's milestone or changes since the last published version.

3.4.0

Enhancement

  • Add option to fix right edge (see #218)
  • Drop restriction for min bar spacing value (see #558)
  • Round corners of the line-style plots (see #731)

Fixed

  • AutoscaleProvider documentation error (see #773)
  • Candlestick upColor and downColor is not changed on applyOptions (see #750)
  • Cleared and reset data appears at visually different location (see #757)
  • Remove unused internal method from SeriesApi (see #768)
  • Removing data for the last series doesn't actually remove the data (see #752)
  • to date of getVisibleRange contains partially visible data item and it's impossible to hover it (see #624)
  • series.priceFormatter().format(price) does not work (see #790)

See issues assigned to this version's milestone or changes since the last published version.

3.3.0

Enhancement

  • Add type predicates for series type (see #670)
  • Create Grid instance for every pane (see #382)
  • Add possibility to chose crosshairMarker color, so it will be independent from line-series color (see #310)
  • Implement option not to shift the time scale at all when data is added with setData (see #584)

Fixed

  • Incorrect bar height when its value is more than chart's height (see #673)
  • Disabling autoScale for non-visible series (see #687)

Thanks to our contributors:

See issues assigned to this version's milestone or changes since the last published version.

3.2.0

Enhancement

  • Feat/gzip friendly colors (see #598)
  • Add coordinateToLogical and logicalToCoordinate (see #587)
  • Add API to show/hide series without removing it (see #471)
  • Add run-time validation of inputs in debug mode (see #315)
  • Pixel perfect renderers fixes (see #535)
  • Add title option to createPriceLine (see #357)

Fixed

  • Set rightOffset and scrollToPosition async as well as setVisibleRange (see #406)
  • timeScale() changes visible range on setData() (see #549)
  • Remove chart's size restriction or make it smaller (see #366)
  • LineStyle.Dotted make no effect (see #572)
  • If priceScaleId is empty string, invalid price scale api is returned (see #537)
  • Incorrect Selection seen on long press in ios webview on chart (see #609)
  • One-point line series is invisible (see #597)
  • Empty price scale after creating series with the same price range (see #615)

Infra and dev env

  • Compress artifacts in graphics tests in CI (see #145)
  • Run tests against production build (see #503)
  • Add test to check code usage coverage (see #495)
  • Migrate from codechecks (see #356)
  • Updated dev deps

Thanks to our contributors:

See issues assigned to this version's milestone or changes since the last published version.

3.1.5

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

  • TypeError _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.

3.1.3

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.

3.1.2

Fixed

  • Crosshair doesn't work on touch devices (see #511)

See issues assigned to this version's milestone or changes since the last published version.

3.1.1

Fixed

See issues assigned to this version's milestone or changes since the last published version.

3.1.0

Enhancement

  • Whitespaces support (see #209)
  • Custom font families for watermarks (see #437)

Fixed

  • Added support for 'transparent' color (see #491)
  • Refactor DataLayer/ChartApi (see #270)
  • Remove series then scroll to right after not working (see #355)
  • Scaling via mouse click and drag doesn't work if chart is inside shadow root (see #427)
  • Applying watermark in setTimeout doesn't make an effect (see #485)
  • Importing the library in server-side context caused 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

  • Dropped support NodeJS < 12.18
  • Migrated from TSLint to ESLint (see #314)
  • Migrated from clean-publish to in-house script to clear package.json (see #474)

Thanks to our contributors:

See issues assigned to this version's milestone or changes since the last published version.

3.0.1

Fixed

  • Correctly handle 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.

3.0.0

Breaking changes

We have some breaking changes since the latest version due some features and API improvements:

  • Methods subscribeVisibleTimeRangeChange and unsubscribeVisibleTimeRangeChange has been moved from ChartApi to TimeScaleApi
  • Since 3.0 you can specify price axis you'd like to place the series on. The same for moving the series between price scales (see migration guide below)

See breaking changes doc with migration guide to migrate smoothly.

Enhancement

  • Added ability to customize time scale tick marks formatter (see #226)
  • Added ability to put text for series markers (see #207)
  • Added ability to specify your own date formatter (see #368)
  • Improved tick marks generation algorithm for the first point (see #387)
  • Made inbound types weakly (outbound ones should be strict) (see #374)
  • Removed non-exported const enum's JS code (see #432)
  • Introduced ts-transformer-properties-rename instead of ts-transformer-minify-privates (see #436)

Added

  • Add ability to override series' autoscale range (see #392)
  • Add API to get price scale's width (see #452)
  • Disabling/enabling scaling axis for both price and time (see #440)
  • Get screen coordinate by a time point (see #435)
  • Remove tick mark from price label (see #378)
  • Support the second price axis (see #129)
  • Visible time range should have bars count of the space from left/right (see #335)

Fixed

  • series.setMarkers requires at least one data point (see #372)
  • Impossible to override the only width or height in constructor (see #353)
  • Incorrect alignment of markers if series has gaps (see #464)
  • Multiple series: error while trying to scroll the chart (see #373)
  • Replace const enums with enums to let use them in projects with enabled isolatedModules option (see #375)

Thanks to our contributors:

See issues assigned to this version's milestone or changes since the last published version.

2.0.0

Breaking changes

  • Removed unused lineWidth property from HistogramStyleOptions interface (it affects nothing, but could break your compilation)
  • Changed order of width and height args in resize method (#157)
  • Pattern for all non-solid (dotted, dashed, large dashed and sparse dotted) line styles was a bit changed (#274)

Enhancement

  • Pixel-perfect rendering (#274)
  • Time scale enhancements (#352)

Added

  • Disable all kinds of scrolls and touch with one option (#230)
  • Added to the acceptable date formats (#296)
  • Add option to show the "global" last value of the series instead of the last visible (#203)

Fixed

  • Price line didn`t hightlight price (#273)
  • CreatePriceLine not removed (#285)
  • Crosshair line not visible when priceScale position set to none (#302)
  • chart.resize parameter is inverted (#157)
  • Removed unnecessary spacing from left/right (1 bar from each side) in fitContent (#345)

Thanks to our contributors:

See issues assigned to this version’s milestone or changes since the last published version.

1.2.2

Fixed

  • Bug while rendering few datasets with not equal timescale (#321)

1.2.1

Added

  • Add custom price lines (#183)
  • Migrate canvas-related logic to fancy-canvas library (#141)
  • Add coordinateToPrice method to ISeriesApi (#171)

Fixed

  • Scrolling by price is incorrect (#213)
  • Histogram (volume) does not honor color setting (sometimes) (#233)
  • Logarithmic scaling is applied to volume (#227)
  • hoveredSeries in mouse events params is always undefined (#190)
  • lineType option does not work for area/line series (#220)
  • Double clicking on time scale will reset fix left edge (#224)
  • Series' marker does not aligned after autoscale (#212)
  • Error on setData empty array for overlay histogram series (#267)
  • Added some missing docs (#211 #193 #245)

See issues assigned to this version’s milestone or changes since the last published version.

1.1.0

Added

Fixed

  • The chart can't start from the left (#144)
  • OHLC charts render incorrect when value is provided (#165)
  • Price axis is not shown if series is created inside promise chain (#164)
  • The line chart can't move to the left (#143)
  • Lots of non-passive event listener warnings (#139)
  • applyOptions of histogram series with color doesn't affect the data (#112)
  • Price Axis Scaling Bug (#122)
  • LineSeries is not displayed if starting x value is out of viewport (#116)
  • Crosshair isn't updated when timescale is changed (#120)
  • Pinch isn't prevented by long tap (#95)

Thanks to our contributors:

See issues assigned to this version’s milestone or changes since the last published version.

1.0.2

Fixed

  • The histogram last bar not hide in chart (#133)

1.0.1

Fixed

  • Setting the data to series fails after setting the data to histogram series with custom color (#110)

1.0.0

The first release.

The docs for this version are available here.