
It supports candlestick, bar, line, area, baseline, and histogram series for stock, crypto, and market dashboards.
You can use it to build browser-based market UI that needs price history, live candle updates, trade markers, reference lines, multiple price scales, or chart image export.
Features
- Render financial charts with an HTML5 canvas-based library.
- Display candlestick, bar, line, area, baseline, and histogram series.
- Load the library through npm modules or a standalone browser build.
- Update the latest price point for live market displays.
- Add trade or event markers through the version 5 marker primitive.
- Customize crosshairs, price scales, time scales, scrolling, and scaling behavior.
- Create price lines and serialize a rendered chart as an image.
Use Cases
- Price dashboards: show OHLC candlesticks with pan and zoom controls.
- Market watchlists: display small line or area charts beside current quotes.
- Trade journals: attach entry and exit markers to price history.
- Realtime displays: append the latest candle through the series update API.
- Trading analysis views: plot thresholds, dual scales, and crosshair-based values.
Installation
Install the npm package for module-based applications. The package includes TypeScript declarations.
npm install --save lightweight-charts
Import the chart constructor and the series types used by your chart.
import { CandlestickSeries, ColorType, createChart } from 'lightweight-charts';For a browser script setup, load the standalone build. Its exports are available through window.LightweightCharts.
<script src="https://unpkg.com/lightweight-charts/dist/lightweight-charts.standalone.production.js"></script>
How To Use Lightweight Charts v5
Basic Candlestick Chart
Add a container for the chart, create the chart, and register a CandlestickSeries through addSeries(). Candlestick data uses open, high, low, and close values for each time point.
<div id="market-chart" style="height: 360px;"></div>
import { CandlestickSeries, ColorType, createChart } from 'lightweight-charts';
const container = document.getElementById('market-chart');
const chart = createChart(container, {
height: 360,
layout: {
textColor: '#334155',
background: { type: ColorType.Solid, color: '#ffffff' },
},
});
// Version 5 creates every built-in series with addSeries().
const candles = chart.addSeries(CandlestickSeries, {
upColor: '#16a34a',
downColor: '#dc2626',
borderVisible: false,
wickUpColor: '#16a34a',
wickDownColor: '#dc2626',
});
candles.setData([
{ time: '2026-05-18', open: 102.40, high: 105.10, low: 101.80, close: 104.60 },
{ time: '2026-05-19', open: 104.60, high: 106.00, low: 103.20, close: 103.75 },
{ time: '2026-05-20', open: 103.75, high: 107.45, low: 103.50, close: 106.90 },
{ time: '2026-05-21', open: 106.90, high: 108.20, low: 105.90, close: 107.60 },
]);
chart.timeScale().fitContent();Browser Build Example
The standalone build provides the same series types through the global namespace. This setup fits a static demo page or a small prototype.
const chart = LightweightCharts.createChart(
document.getElementById('market-chart'),
{ height: 360 }
);
const candles = chart.addSeries(LightweightCharts.CandlestickSeries);
candles.setData([
{ time: '2026-05-20', open: 53.20, high: 55.80, low: 52.90, close: 55.10 },
{ time: '2026-05-21', open: 55.10, high: 56.25, low: 54.40, close: 54.85 },
]);Add an Area Series with a Dashed Line
An area series can show a reference value or a portfolio curve beside a price series. Version 5 accepts LineStyle.Dashed as the line style value.
import { AreaSeries, LineStyle } from 'lightweight-charts';
const portfolio = chart.addSeries(AreaSeries, {
lineColor: '#2563eb',
lineStyle: LineStyle.Dashed,
topColor: 'rgba(37, 99, 235, 0.20)',
bottomColor: 'rgba(37, 99, 235, 0.02)',
});
portfolio.setData([
{ time: '2026-05-18', value: 100.00 },
{ time: '2026-05-19', value: 101.20 },
{ time: '2026-05-20', value: 103.15 },
{ time: '2026-05-21', value: 102.70 },
]);Use Bar, Line, Histogram, and Baseline Series
Lightweight Charts v5 provides six built-in series definitions. Candlestick and bar series use OHLC data, while line, area, baseline, and histogram series use value data. A histogram series commonly displays volume below a price series.
import {
BarSeries,
BaselineSeries,
HistogramSeries,
LineSeries,
} from 'lightweight-charts';
const bars = chart.addSeries(BarSeries, {
upColor: '#16a34a',
downColor: '#dc2626',
});
bars.setData([
{ time: '2026-05-20', open: 106.25, high: 108.10, low: 105.40, close: 107.80 },
{ time: '2026-05-21', open: 107.80, high: 109.00, low: 106.70, close: 108.35 },
]);
const closingPrice = chart.addSeries(LineSeries, {
color: '#7c3aed',
lineWidth: 2,
});
closingPrice.setData([
{ time: '2026-05-20', value: 107.80 },
{ time: '2026-05-21', value: 108.35 },
]);
const changeFromOpen = chart.addSeries(BaselineSeries, {
baseValue: { type: 'price', price: 107.80 },
});
changeFromOpen.setData([
{ time: '2026-05-20', value: 107.80 },
{ time: '2026-05-21', value: 108.35 },
]);
const volume = chart.addSeries(HistogramSeries, {
priceFormat: { type: 'volume' },
priceScaleId: '',
});
volume.setData([
{ time: '2026-05-20', value: 1820000, color: '#86efac' },
{ time: '2026-05-21', value: 2115000, color: '#86efac' },
]);Add Markers in Version 5
Version 5 moves marker management out of the series object. Import createSeriesMarkers, pass the target series, and retain the returned marker API when you need to replace or clear markers.
import { createSeriesMarkers } from 'lightweight-charts';
const tradeMarkers = createSeriesMarkers(candles, [
{
time: '2026-05-19',
position: 'belowBar',
color: '#2563eb',
shape: 'arrowUp',
text: 'Buy',
},
{
time: '2026-05-21',
position: 'aboveBar',
color: '#dc2626',
shape: 'arrowDown',
text: 'Sell',
},
]);
// Replace the marker collection when new trade events arrive.
tradeMarkers.setMarkers([]);Chart Configuration
Appearance, Crosshair, and Interaction Controls
Apply chart-level options when you need a custom theme, price formatting, crosshair behavior, or input controls. The same applyOptions() method can update these settings after initialization.
import { ColorType, CrosshairMode, LineStyle } from 'lightweight-charts';
chart.applyOptions({
layout: {
background: { type: ColorType.Solid, color: '#0f172a' },
textColor: '#cbd5e1',
},
localization: {
priceFormatter: (price) => '$' + price.toFixed(2),
},
grid: {
vertLines: { color: '#1e293b' },
horzLines: { color: '#1e293b' },
},
rightPriceScale: {
borderColor: '#334155',
},
timeScale: {
timeVisible: true,
secondsVisible: false,
rightOffset: 6,
},
crosshair: {
mode: CrosshairMode.Normal,
vertLine: {
color: '#64748b',
style: LineStyle.Dashed,
},
horzLine: {
color: '#64748b',
style: LineStyle.Dashed,
},
},
handleScroll: {
mouseWheel: true,
pressedMouseMove: true,
horzTouchDrag: true,
vertTouchDrag: false,
},
handleScale: {
mouseWheel: true,
pinch: true,
},
});Add a Text Watermark
Version 5 provides watermark support through a pane primitive. Add a text watermark to the first pane for a symbol label or a delayed-data notice.
import { createTextWatermark } from 'lightweight-charts';
const watermark = createTextWatermark(chart.panes()[0], {
horzAlign: 'center',
vertAlign: 'center',
lines: [
{
text: 'NASDAQ: ACME',
color: 'rgba(148, 163, 184, 0.20)',
fontSize: 24,
},
],
});
// Remove the label when this chart is reused for another view.
watermark.detach();Place a Series on the Left Price Scale
Charts use the right price scale by default. Enable the left scale and assign a series to it when you need to compare values with different units, such as price and an index.
import { LineSeries } from 'lightweight-charts';
chart.applyOptions({
leftPriceScale: { visible: true },
rightPriceScale: { visible: true },
});
const benchmark = chart.addSeries(LineSeries, {
color: '#f97316',
priceScaleId: 'left',
});
benchmark.setData([
{ time: '2026-05-20', value: 4900.25 },
{ time: '2026-05-21', value: 4921.80 },
]);Append Realtime Data
Call update() when a new quote changes the most recent bar or adds the next bar. Return the viewer to the latest data with the time scale API after they scroll through historical prices.
// Update the most recent candle or append a later candle.
candles.update({
time: '2026-05-22',
open: 107.60,
high: 110.20,
low: 107.10,
close: 109.75,
});
// Scroll back to the latest quoted bar.
chart.timeScale().scrollToRealTime();Migrate from Version 4 to Version 5
Version 5 replaces the type-specific chart creation methods with one addSeries() method. Code written for version 4 with addCandlestickSeries() or addAreaSeries() must import a series type in module builds, or access that type from LightweightCharts in the standalone build.
| Version 4 call | Version 5 replacement |
|---|---|
chart.addCandlestickSeries(options) | chart.addSeries(CandlestickSeries, options) |
chart.addAreaSeries(options) | chart.addSeries(AreaSeries, options) |
chart.addLineSeries(options) | chart.addSeries(LineSeries, options) |
chart.addBarSeries(options) | chart.addSeries(BarSeries, options) |
series.setMarkers(markers) | createSeriesMarkers(series, markers) |
When an application reports addCandlestickSeries is not a function after upgrading, replace the old method and import CandlestickSeries. When marker methods fail, move the marker data to a createSeriesMarkers() instance.
Configuration Options
Chart Options
| Option | Purpose |
|---|---|
layout | Sets chart background and text colors. |
localization | Formats displayed prices and localized values. |
grid | Styles horizontal and vertical grid lines. |
crosshair | Controls crosshair mode and line appearance. |
leftPriceScale / rightPriceScale | Configures price-axis visibility and styling. |
timeScale | Controls visible time values, spacing, and right offset. |
handleScroll | Enables or disables wheel, mouse-drag, and touch scrolling. |
handleScale | Controls wheel and pinch scaling behavior. |
Series Options Used in Financial Charts
| Option | Applies to | Purpose |
|---|---|---|
upColor, downColor | Candlestick, bar | Sets rising and falling price colors. |
wickUpColor, wickDownColor | Candlestick | Sets wick colors for rising and falling candles. |
borderVisible | Candlestick | Shows or hides candle borders. |
lineColor, lineStyle | Area, line | Sets the series line color and dash style. |
topColor, bottomColor | Area | Sets the gradient fill above and below the line. |
baseValue | Baseline | Sets the reference value used for above/below styling. |
priceFormat | Series | Formats price or volume values on the axis and crosshair. |
priceScaleId | Series | Assigns a series to the left, right, or overlay scale. |
API Methods and Events
Core API Methods
| Method | Purpose |
|---|---|
createChart(container, options) | Creates a chart in a target element. |
chart.addSeries(definition, options) | Adds a built-in series type in version 5. |
chart.applyOptions(options) | Updates chart appearance and interaction settings. |
series.setData(data) | Replaces all data points in a series. |
series.update(item) | Updates the last bar or appends a later item. |
series.createPriceLine(options) | Adds a labeled horizontal price reference. |
series.removePriceLine(line) | Removes a previously created price reference. |
series.priceToCoordinate(price) | Converts a price to its vertical coordinate. |
series.coordinateToPrice(y) | Converts a vertical coordinate to a series price. |
series.barsInLogicalRange(range) | Reports series bars around a visible logical range. |
chart.timeScale().fitContent() | Fits the available series data into the viewport. |
chart.timeScale().scrollToRealTime() | Scrolls a realtime chart back to its latest data. |
chart.takeScreenshot() | Returns a canvas image of the rendered chart. |
chart.subscribeClick(handler) | Registers a handler for user clicks on the chart. |
chart.subscribeCrosshairMove(handler) | Registers a handler for crosshair movement. |
Price Lines and Price Coordinates
A series can add horizontal reference lines for entry targets, stop levels, or alerts. The series API also converts values to chart coordinates and coordinates back to prices.
import { LineStyle } from 'lightweight-charts';
const targetLine = candles.createPriceLine({
price: 110.00,
color: '#16a34a',
lineWidth: 2,
lineStyle: LineStyle.Dotted,
axisLabelVisible: true,
title: 'Target',
});
const y = candles.priceToCoordinate(110.00);
if (y !== null) {
const price = candles.coordinateToPrice(y);
console.log('Price at target coordinate:', price);
}
// Remove the reference line when it no longer applies.
candles.removePriceLine(targetLine);Visible Range Data and Screenshots
Read the visible logical range to inspect series data in the current viewport. Export a rendered chart through the canvas returned by takeScreenshot().
const visibleRange = chart.timeScale().getVisibleLogicalRange();
if (visibleRange !== null) {
const barsInfo = candles.barsInLogicalRange(visibleRange);
if (barsInfo !== null) {
console.log(barsInfo.barsBefore, barsInfo.barsAfter);
}
}
const canvas = chart.takeScreenshot();
const pngDataUrl = canvas.toDataURL('image/png');Click and Crosshair Events
Subscribe to chart events to update a tooltip, detail panel, or selected-price readout. Keep a named handler when you need to unsubscribe it later.
function handleCrosshairMove(param) {
if (!param.point || !param.time) {
return;
}
console.log('Cursor time:', param.time);
}
function handleChartClick(param) {
if (!param.point) {
return;
}
console.log('Selected chart point:', param.point);
}
chart.subscribeCrosshairMove(handleCrosshairMove);
chart.subscribeClick(handleChartClick);
// Remove listeners when this chart view is destroyed.
chart.unsubscribeCrosshairMove(handleCrosshairMove);
chart.unsubscribeClick(handleChartClick);Related JavaScript Chart Libraries
- ApexCharts SVG Chart Library
- NiceChart SVG Chart and Graph Library
- JavaScript Chart and Graph Resources
- JavaScript Line Chart Libraries
- Gauge Chart Libraries
Official Resources
FAQ
Q: Why does addCandlestickSeries fail in Lightweight Charts v5?
A: Version 5 uses chart.addSeries(CandlestickSeries, options). Import CandlestickSeries from the package when you use ES modules.
Q: Can I use Lightweight Charts v5 from a CDN?
A: Yes. Load the standalone production script from unpkg and use exports such as LightweightCharts.CandlestickSeries from the global namespace.
Q: How do I replace setMarkers() in version 5?
A: Import createSeriesMarkers and create a marker primitive for your series. Use the returned instance to update or clear marker data.
Q: Does the npm package support TypeScript projects?
A: Yes. The package includes TypeScript declarations.
Q: Can I render Lightweight Charts on a Node.js server?
A: The library is designed for client-side browser rendering. Initialize charts in browser code after the target container is available.
Changelog:
v5.2.0 (04/24/2026)
- Added hoveredSeriesOnTop option (default: true) that renders the currently hovered series above other series in the same pane.
- Added series hit testing for built-in and custom series. Mouse event payloads now include hoveredItem and hoveredTarget, exposing the hovered series and associated object metadata. Built-in line-like, range-like, and composite renderers all support hit testing, while custom series can opt in via an optional ICustomSeriesPaneRenderer.hitTest() hook (a geometry-based fallback is used when the hook isn’t provided).
- Added defaultVisiblePriceScaleId chart option to control which visible price scale (‘left’ or ‘right’) is preferred as the default when both are available. Defaults to ‘right’.
- Added tickMarkDensity option to price scale options, providing control over tick mark label density. A higher value results in more spacing between tick marks and fewer tick marks; a lower value results in less spacing and more tick marks. Defaults to 2.5.
- Improved dashed and dotted line rendering so that the dash phase remains continuous when a series changes stroke color per data item. Previously, dash patterns would restart at each color boundary, producing visual discontinuities.
- Bug Fixes
v5.1.0 (12/16/2025)
- New Data Conflation for automatic performance optimization
- Opt-in activation and configurable options for conflation
- doNotSnapToHiddenSeriesIndices option added to CrosshairOptions
- Fixed price axis label positioning with plugin views
- Fixed time scale fitContent to properly respect rightOffset option
v5.0.9 (10/02/2025)
- Added 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.
- 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.
- Enhanced takeScreenshot method with two new optional parameters.
- Added 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.
- Added 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.
- Enhanced plugin API with additional functionality.
- Bugfixes
v5.0.8 (06/26/2025)
- Added addDefaultPane option to chart options, allowing creation of charts with no initial panes
- Added addPane method to IChartApi for programmatically adding panes
- Added setPreserveEmptyPane and preserveEmptyPane methods to control empty pane behavior
- Added getStretchFactor and setStretchFactor methods to control relative pane sizes
- Added addCustomSeries and addSeries methods to IPaneApi for creating series directly on a specific pane
- Updated getHTMLElement to return null when a pane hasn’t been created yet
- These improvements provide greater flexibility when working with multi-pane charts
- Added formatTickmarks method to IPriceFormatter interface
- Added tickmarksPriceFormatter and tickmarksPercentageFormatter options to LocalizationOptionsBase
- Added tickmarksFormatter option to PriceFormatCustom
v5.0.7 (05/17/2025)
- Added price scale visible range control with new methods in IPriceScaleApi: setVisibleRange, getVisibleRange, and setAutoScale. 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.
- Added control over the rendering stacking order of series markers through a new zOrder option in the series markers plugin. This enhancement provides greater flexibility in controlling marker visibility and layering in complex charts.
v5.0.6 (04/21/2025)
- Implemented series order functionality, allowing control over the rendering order of series within a pane. Series with higher order values are rendered on top of those with lower values. Added two new methods to ISeriesApi: seriesOrder() to get the current order index and setSeriesOrder(order) to set a specific order.
v5.0.5 (03/29/2025)
- Fixed an issue where the series marker plugin could throw an exception if the series data required for individual markers could not be found (such as when the data is cleared or changed via setData on the series).
v5.0.4 (03/24/2025)
- Fixed performance degradation when adding series markers to charts with large datasets (15,000+ data points) by optimizing marker calculations to only run when necessary.
- Added price-based positioning for series markers, allowing more precise control over marker placement. New position types include atPriceTop, atPriceBottom, and atPriceMiddle, which require a price value to be specified.
- Added 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.
- Fixed an issue where the crosshair marker would be visible on the first data point when the chart is initially loaded, before any user interaction. This behavior has been reverted to match version 4, where the crosshair remains hidden until user interaction.
v5.0.3 (02/26/2025)
- Bugfixes
v5.0.2 (02/11/2025)
- Bugfixes
v5.0.1 (01/31/2025)
- Multi-Pane Support
- New Chart Types
- Enhanced Color Support
- Architectural Improvements
- Enhancements
- Bugfixes
v4.2.3 (01/24/2025)
- Improve check for crosshair label visibility on the price scale.
- Bugfixes.
v4.2.2 (12/07/2024)
- Improved price scale width calculation by not allocating space for crosshair labels when the crosshair is disabled.
- Fixed calculations for fixLeftEdge and fixRightEdge on the first render when both are true and data is added to an initially empty chart.
v4.2.1 (10/02/2024)
- Fixed an issue where the series title part of a price scale label appeared blurry when using Firefox.
v4.2.0 (07/26/2024)
- Added new 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. The TradingView attribution logo can be easily hidden by setting the attributionLogo option to false in the chart’s layout option.
- Improved data validation for OhlcData and SingleValueData. Introduced isFulfilledBarData for OhlcData and isFulfilledLineData for SingleValueData, ensuring more accurate validation of data types.
v4.1.7 (07/11/2024)
- Further Refinement of the Price Scale Label Alignment.
v4.1.6 (06/21/2024)
- Improved Price Scale Label Alignment: Enhanced the alignment algorithm for price scale labels to ensure they do not move out of the viewport. This improves the visibility of price labels, particularly when they are near the edges of the scale.
v4.1.5 (06/11/2024)
- Added IHorzScaleBehavior.shouldResetTickmarkLabels.
v4.1.4 (05/08/2024)
- Lots of bugs fixed
v4.1.3 (02/06/2024)
- Added option to disable bold labels in the time scale.
- Fixed sub-pixel horizontal alignment of the crosshair marker and series markers.
v4.1.1 (01/16/2024)
- Fix for ‘Total canvas memory use exceeds the maximum limit’ error raised on iOS Safari.
- Improved error messages for price scale margins.
v4.1.1 (10/25/2023)
- Fixed 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.
- When disabling touch scrolling on the chart via either the 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.
v4.1.0 (10/05/2023)
- Added point markers styling option for line-based series.
- Added double click subscriber for the main chart pane.
- Added setCrosshairPosition API, allowing programmatic setting of the crosshair position.
- Added an option to disable crosshair. Introduced the Hidden option in the CrosshairMode setting.
- Allow overriding tick mark label length via the tickMarkMaxCharacterLength option.
- Support for overriding the percentage formatter within the localization options.
- Added paneSize getter to IChartApi, returning the dimensions of the chart pane.
- Added options to set minimum dimensions for the price and time scales.
- Bug Fixes
v4.0.1 (03/21/2023)
- Add the ability to specify font colour for the Priceline labels.
- Ignore resize method if autoSize is active, and added API to check if active.
- Bug fixes
v3.8.0 (02/17/2022)
- Quick tracking mode
- Improved mouse behaviour on touch devices (like mouse connected to mobile phone/tablet)
- Custom color for items of candlestick and line series
- Labels might be cut off when disabling scale and scroll
- Add ability to disable visibility of price line line
- Bugs Fixed
v3.7.0 (11/08/2021)
- The new baseline series chart
- Added methods to get time axis size and subscribe on size change
- Improved performance of setting/updating series data
- Use lowerbound in TimeScale timeToIndex search
- Increased min price tick mark step up to 1e-14
- Do not paint time axis if it not visible
- Remove color customisation from settings.json
v3.6.1 (09/13/2021)
- Bugfix
v3.6.0 (09/10/2021)
- Gradient chart background color
- How to add buffer animation to price jump
- Kinetic scroll
- Fixed bugs
v3.5.0 (08/04/2021)
- Bugs fixed
v3.4.0 (07/21/2021)
- Add option to fix right edge
- Drop restriction for min bar spacing value
- Round corners of the line-style plots
- Bugs fixed
v3.3.0 (02/01/2021)
- Add type predicates for series type
- Create Grid instance for every pane
- Add possibility to chose crosshairMarker color, so it will be independent from line-series color
- Implement option not to shift the time scale at all when data is added with setData
- Incorrect bar height when its value is more than chart’s height
- Disabling autoScale for non-visible series
v3.2.0 (07/30/2020)
- Feat/gzip friendly colors
- Add coordinateToLogical and logicalToCoordinate
- Add API to show/hide series without removing it
- Add run-time validation of inputs in debug mode
- Pixel perfect renderers fixes
- Add title option to createPriceLine
- Bugfixes
v3.1.4/5 (07/30/2020)
- Bugfix
v3.1.3 (07/21/2020)
- Fixed handleScroll and handleScale options aren’t applied
v3.1.2 (07/07/2020)
- Fixed Crosshair doesn’t work on touch devices
v3.1.1 (06/30/2020)
- Fixed production build of 3.1 version
v3.1.0 (06/29/2020)
- Whitespaces support
- Custom font families for watermarks
- Bugfix
v3.0.1 (06/15/2020)
- Correctly handle overlay: true in series options while create series to backward compact
v3.0.0 (06/11/2020)
- 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
- Added ability to customize time scale tick marks formatter
- Added ability to put text for series markers
- Added ability to specify your own date formatter
- Improved tick marks generation algorithm for the first point
- Made inbound types weakly (outbound ones should be strict)
- Removed non-exported const enum’s JS code
- Add ability to override series’ autoscale range
- Add API to get price scale’s width
- Disabling/enabling scaling axis for both price and time
- Get screen coordinate by a time point
- Remove tick mark from price label
- Support the second price axis
- Visible time range should have bars count of the space from left/right
- Bugs fixed
v2.1.0 (05/31/2020)
- fixed 443 error while updating time scale
v2.0.0 (02/26/2020)
- 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
- Pattern for all non-solid (dotted, dashed, large dashed and sparse dotted) line styles was a bit changed
- Pixel-perfect rendering
- Time scale enhancements
- Disable all kinds of scrolls and touch with one option
- Added to the acceptable date formats
- Add option to show the “global” last value of the series instead of the last visible
- Bugfixed
v1.2.2 (02/22/2020)
- Fixed bug while rendering few datasets with not equal timescale
v1.2.1 (11/28/2019)
- Add custom price lines
- Migrate canvas-related logic to fancy-canvas library
- Add coordinateToPrice method to ISeriesApi
- Bugs fixed
v1.1.0 (08/30/2019)
- Apply localization to specific series
- Series-based markers
- Reduced size of the library by using ts-transformer-minify-privates transformer
- Bugs fixed
07/19/2019
- Fixed: The histogram last bar not hide in chart
07/19/2019
- Fixed: The histogram last bar not hide in chart
07/11/2019
- Fixed: Setting the data to series fails after setting the data to histogram series with custom color
The post Lightweight Financial Chart JavaScript Library – lightweight-charts v5 appeared first on CSS Script.
Discover more from RSS Feeds Cloud
Subscribe to get the latest posts sent to your email.
