Performant financial charts built with HTML5 canvas
Go to file
2019-06-13 12:55:53 +03:00
.circleci Tests, CI: Enabled storing xunit reports to CI 2019-06-11 13:38:47 +03:00
.github Added GitHub issue templates 2019-06-06 12:07:44 +03:00
.vscode The first public commit 2019-05-29 11:22:19 +03:00
docs Update series-basics.md 2019-06-11 11:28:36 +03:00
scripts Restrict a minimal supported for development version of NodeJS to 10 2019-06-04 17:41:28 +03:00
src Series' base cannot be double 2019-06-13 10:09:09 +03:00
tests Improved writing output in graphics tests 2019-06-13 11:35:29 +03:00
.editorconfig The first public commit 2019-05-29 11:22:19 +03:00
.eslintignore The first public commit 2019-05-29 11:22:19 +03:00
.eslintrc.js Changed max blank lines in JS code to 1 2019-05-31 10:36:23 +03:00
.gitignore Added debug page 2019-06-13 12:55:53 +03:00
.markdownlint.json Introduced markdownlint 2019-05-31 16:18:17 +03:00
.mocharc.js Tests, CI: Enabled storing xunit reports to CI 2019-06-11 13:38:47 +03:00
.npmrc The first public commit 2019-05-29 11:22:19 +03:00
BUILDING.md Added debug page 2019-06-13 12:55:53 +03:00
CONTRIBUTING.md Updated CONTRIBUTING.md 2019-06-10 16:58:12 +03:00
debug.html.example Added debug page 2019-06-13 12:55:53 +03:00
dts-config.js The first public commit 2019-05-29 11:22:19 +03:00
index.js The first public commit 2019-05-29 11:22:19 +03:00
LICENSE Initial commit 2019-05-24 17:41:50 +03:00
NOTICE Changed notice content 2019-05-31 16:40:37 +03:00
package.json Chore: Updated deps 2019-06-11 12:18:52 +03:00
README.md Renamed getting-started.md to README.md 2019-06-07 19:21:00 +03:00
rollup.config.js Fixed build env variable 2019-06-03 16:39:44 +03:00
tsconfig.all-non-composite.json The first public commit 2019-05-29 11:22:19 +03:00
tsconfig.base.json Introduced build-time constants 2019-05-31 15:34:33 +03:00
tsconfig.json The first public commit 2019-05-29 11:22:19 +03:00
tslint.json The first public commit 2019-05-29 11:22:19 +03:00

Lightweight Charts

CircleCI npm version npm bundle size Zero dependencies Downloads

Demos | Documentation

TradingView Lightweight Charts is one of the smallest and fastest financial HTML5 charts.

The Lightweight Charting Library is the best choice for you if you want to display financial data as an interactive chart on your web page without affecting your web page loading speed and performance.

It is the best choice for you if you want to replace static image charts with interactive ones. The size of the library is close to static images but if you have dozens of image charts on a web page then using this library can make the size of your web page smaller.

Installing

es6 via npm

npm install lightweight-charts
import { createChart } from 'lightweight-charts';

const chart = createChart(document.body, { width: 400, height: 300 });
const lineSeries = chart.addLineSeries();
lineSeries.setData([
    { time: '2019-04-11', value: 80.01 },
    { time: '2019-04-12', value: 96.63 },
    { time: '2019-04-13', value: 76.64 },
    { time: '2019-04-14', value: 81.89 },
    { time: '2019-04-15', value: 74.43 },
    { time: '2019-04-16', value: 80.01 },
    { time: '2019-04-17', value: 96.63 },
    { time: '2019-04-18', value: 76.64 },
    { time: '2019-04-19', value: 81.89 },
    { time: '2019-04-20', value: 74.43 },
]);

CDN

You can use unpkg:

https://unpkg.com/lightweight-charts/dist/lightweight-charts.standalone.production.js

The standalone version creates window.LightweightCharts object with all exports from esm version:

const chart = LightweightCharts.createChart(document.body, { width: 400, height: 300 });
const lineSeries = chart.addLineSeries();
lineSeries.setData([
    { time: '2019-04-11', value: 80.01 },
    { time: '2019-04-12', value: 96.63 },
    { time: '2019-04-13', value: 76.64 },
    { time: '2019-04-14', value: 81.89 },
    { time: '2019-04-15', value: 74.43 },
    { time: '2019-04-16', value: 80.01 },
    { time: '2019-04-17', value: 96.63 },
    { time: '2019-04-18', value: 76.64 },
    { time: '2019-04-19', value: 81.89 },
    { time: '2019-04-20', value: 74.43 },
]);

Development

See BUILDING.md for instructions on how to build lightweight-charts from source.

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at LICENSE file. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

This software incorporates several parts of tslib (https://github.com/Microsoft/tslib, (c) Microsoft Corporation) that are covered by the the Apache License, Version 2.0.

This license requires specifying TradingView as the product creator. You can use one of the following methods to do it:

  • do not disable the TradingView branding displaying;
  • add the "attribution notice" from the NOTICE file and a link to our website (https://www.tradingview.com/) to the page of your website or mobile application that is available to your users;