Catalog npm
Back to packageRELEASE DETAILS

4.1.0-alpha.1

npm

@0xbutterfield/lightweight-charts

Performant financial charts built with HTML5 canvas

canvaschartingcharting-librarychartsfinancial-charting-libraryhtml5-chartstypescript
Published28 Mar 2023
Direct dependencies53
Transitive dependenciesNot calculated

README

Current package documentation

Lightweight Charts™

CircleCI npm version npm bundle size Dependencies count Downloads

Demos | Documentation | Discord community | Reddit

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

The Lightweight Charts™ 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 },
]);

Build Variants

Dependencies includedModeES moduleCommonJS ⚠️IIFE (window.LightweightCharts)
NoPRODlightweight-charts.production.mjslightweight-charts.production.cjsN/A
NoDEVlightweight-charts.development.mjslightweight-charts.development.cjsN/A
Yes (standalone)PRODlightweight-charts.standalone.production.mjs-lightweight-charts.standalone.production.js
Yes (standalone)DEVlightweight-charts.standalone.development.mjs-lightweight-charts.standalone.development.js

⚠️ Deprecation note: CommonJS support will be removed from the library at the start of 2024.

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 BSD Zero Clause License.

This license requires specifying TradingView as the product creator. You shall add the "attribution notice" from the NOTICE file and a link to https://www.tradingview.com/ to the page of your website or mobile application that is available to your users. As thanks for creating this product, we'd be grateful if you add it in a prominent place.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 53

Native requirements
53 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
fancy-canvas
Environment
{
  "local_name": "fancy-canvas",
  "alias": false,
  "peer_metadata": null
}
2.1.0runtime
@rollup/plugin-node-resolve
Environment
{
  "local_name": "@rollup/plugin-node-resolve",
  "alias": false,
  "peer_metadata": null
}
~15.0.1development
@rollup/plugin-replace
Environment
{
  "local_name": "@rollup/plugin-replace",
  "alias": false,
  "peer_metadata": null
}
~5.0.2development
@size-limit/file
Environment
{
  "local_name": "@size-limit/file",
  "alias": false,
  "peer_metadata": null
}
~8.1.2development
@types/chai
Environment
{
  "local_name": "@types/chai",
  "alias": false,
  "peer_metadata": null
}
~4.3.4development
@types/glob
Environment
{
  "local_name": "@types/glob",
  "alias": false,
  "peer_metadata": null
}
~8.0.1development
@types/mocha
Environment
{
  "local_name": "@types/mocha",
  "alias": false,
  "peer_metadata": null
}
~10.0.1development
@types/node
Environment
{
  "local_name": "@types/node",
  "alias": false,
  "peer_metadata": null
}
~16.18.9development
@types/pixelmatch
Environment
{
  "local_name": "@types/pixelmatch",
  "alias": false,
  "peer_metadata": null
}
~5.2.4development
@types/pngjs
Environment
{
  "local_name": "@types/pngjs",
  "alias": false,
  "peer_metadata": null
}
~6.0.1development
@typescript-eslint/eslint-plugin
Environment
{
  "local_name": "@typescript-eslint/eslint-plugin",
  "alias": false,
  "peer_metadata": null
}
~5.50.0development
@typescript-eslint/eslint-plugin-tslint
Environment
{
  "local_name": "@typescript-eslint/eslint-plugin-tslint",
  "alias": false,
  "peer_metadata": null
}
~5.50.0development
@typescript-eslint/parser
Environment
{
  "local_name": "@typescript-eslint/parser",
  "alias": false,
  "peer_metadata": null
}
~5.50.0development
bytes
Environment
{
  "local_name": "bytes",
  "alias": false,
  "peer_metadata": null
}
~3.1.2development
chai
Environment
{
  "local_name": "chai",
  "alias": false,
  "peer_metadata": null
}
~4.3.7development
chai-exclude
Environment
{
  "local_name": "chai-exclude",
  "alias": false,
  "peer_metadata": null
}
~2.1.0development
cross-env
Environment
{
  "local_name": "cross-env",
  "alias": false,
  "peer_metadata": null
}
~7.0.3development
dts-bundle-generator
Environment
{
  "local_name": "dts-bundle-generator",
  "alias": false,
  "peer_metadata": null
}
~7.2.0development
eslint
Environment
{
  "local_name": "eslint",
  "alias": false,
  "peer_metadata": null
}
~7.32.0development
eslint-plugin-deprecation
Environment
{
  "local_name": "eslint-plugin-deprecation",
  "alias": false,
  "peer_metadata": null
}
~1.3.3development
eslint-plugin-import
Environment
{
  "local_name": "eslint-plugin-import",
  "alias": false,
  "peer_metadata": null
}
~2.27.5development
eslint-plugin-jsdoc
Environment
{
  "local_name": "eslint-plugin-jsdoc",
  "alias": false,
  "peer_metadata": null
}
~39.8.0development
eslint-plugin-markdown
Environment
{
  "local_name": "eslint-plugin-markdown",
  "alias": false,
  "peer_metadata": null
}
~3.0.0development
eslint-plugin-mdx
Environment
{
  "local_name": "eslint-plugin-mdx",
  "alias": false,
  "peer_metadata": null
}
~1.17.0development
eslint-plugin-prefer-arrow
Environment
{
  "local_name": "eslint-plugin-prefer-arrow",
  "alias": false,
  "peer_metadata": null
}
~1.2.3development
eslint-plugin-react
Environment
{
  "local_name": "eslint-plugin-react",
  "alias": false,
  "peer_metadata": null
}
~7.32.2development
eslint-plugin-tsdoc
Environment
{
  "local_name": "eslint-plugin-tsdoc",
  "alias": false,
  "peer_metadata": null
}
~0.2.17development
eslint-plugin-unicorn
Environment
{
  "local_name": "eslint-plugin-unicorn",
  "alias": false,
  "peer_metadata": null
}
~40.1.0development
express
Environment
{
  "local_name": "express",
  "alias": false,
  "peer_metadata": null
}
~4.18.2development
glob
Environment
{
  "local_name": "glob",
  "alias": false,
  "peer_metadata": null
}
~8.1.0development
markdown-it
Environment
{
  "local_name": "markdown-it",
  "alias": false,
  "peer_metadata": null
}
~13.0.1development
markdown-it-anchor
Environment
{
  "local_name": "markdown-it-anchor",
  "alias": false,
  "peer_metadata": null
}
~8.6.6development
markdownlint-cli
Environment
{
  "local_name": "markdownlint-cli",
  "alias": false,
  "peer_metadata": null
}
~0.33.0development
memlab
Environment
{
  "local_name": "memlab",
  "alias": false,
  "peer_metadata": null
}
~1.1.37development
mocha
Environment
{
  "local_name": "mocha",
  "alias": false,
  "peer_metadata": null
}
~10.2.0development
npm-run-all
Environment
{
  "local_name": "npm-run-all",
  "alias": false,
  "peer_metadata": null
}
~4.1.5development
pixelmatch
Environment
{
  "local_name": "pixelmatch",
  "alias": false,
  "peer_metadata": null
}
~5.3.0development
pngjs
Environment
{
  "local_name": "pngjs",
  "alias": false,
  "peer_metadata": null
}
~6.0.0development
puppeteer
Environment
{
  "local_name": "puppeteer",
  "alias": false,
  "peer_metadata": null
}
~19.6.3development
rimraf
Environment
{
  "local_name": "rimraf",
  "alias": false,
  "peer_metadata": null
}
~4.1.2development
rollup
Environment
{
  "local_name": "rollup",
  "alias": false,
  "peer_metadata": null
}
~3.14.0development
rollup-plugin-terser
Environment
{
  "local_name": "rollup-plugin-terser",
  "alias": false,
  "peer_metadata": null
}
~7.0.2development
size-limit
Environment
{
  "local_name": "size-limit",
  "alias": false,
  "peer_metadata": null
}
~8.1.2development
ts-node
Environment
{
  "local_name": "ts-node",
  "alias": false,
  "peer_metadata": null
}
~10.9.1development
ts-transformer-properties-rename
Environment
{
  "local_name": "ts-transformer-properties-rename",
  "alias": false,
  "peer_metadata": null
}
~0.14.0development
ts-transformer-strip-const-enums
Environment
{
  "local_name": "ts-transformer-strip-const-enums",
  "alias": false,
  "peer_metadata": null
}
~1.0.1development
tslib
Environment
{
  "local_name": "tslib",
  "alias": false,
  "peer_metadata": null
}
2.5.0development
tslint
Environment
{
  "local_name": "tslint",
  "alias": false,
  "peer_metadata": null
}
6.1.3development
tslint-eslint-rules
Environment
{
  "local_name": "tslint-eslint-rules",
  "alias": false,
  "peer_metadata": null
}
~5.4.0development
tslint-microsoft-contrib
Environment
{
  "local_name": "tslint-microsoft-contrib",
  "alias": false,
  "peer_metadata": null
}
~6.2.0development
ttypescript
Environment
{
  "local_name": "ttypescript",
  "alias": false,
  "peer_metadata": null
}
~1.5.15development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
4.9.5development
yargs
Environment
{
  "local_name": "yargs",
  "alias": false,
  "peer_metadata": null
}
~17.6.2development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-HYNCS8DQA38GKPNqLnSlNjAOmvJFMXtZRJSskf1NlXtfoZwJ0BjvAn+hbtFZkkKHicKbmeobHBaCn/2ZJawjVg==",
  "shasum": "237b823f07fcdeb87a735d52330420449e16c5cf",
  "tarball": "https://registry.npmjs.org/@0xbutterfield/lightweight-charts/-/lightweight-charts-4.1.0-alpha.1.tgz",
  "fileCount": 13,
  "unpackedSize": 2933529,
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIQDkjJ7zhSfy7pf0cP36Lo7mZOfv6pFZXssw/Lq4R3u3uwIgIe8IkypPC1DM9GrWTXM5l7Rg8jBXbxYs10xVrMCSDe4="
    }
  ],
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIyNuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrvGBAAkNRkUPASuVglnOW7iHJU/SJ74rxRKtydwS/jUCqpkUmRax9/\r\nLqxE/4wwJV1lahtJKc8z/euOmRT9g99TVCPX91ZaLRlBjIOlelmK2vpNSq62\r\n4j7C3HsYb/HAUT4hAkt7T9JvFnw/1+s0JEoZ6jP7bSniTjiwsg3kvHN2rLIH\r\nn6s2JlYGGwI1U5GMD9JDn4ebOFA5LvGPgwtq1n6WnzFFrdRvqWSsdLeZ89KS\r\nfT4WLFYp+AuCzo8NT7MlM0P0J3yfyx8DaXW7fSzLMVVBiKbB+sMWl/uWvfvZ\r\nuU/15HQx9ygibl6tUcSASZXU57iybLFVu3wS3y6Hs/R6aAHRvgjM/riKNpQk\r\nCCooFvWaCvltXGulj+6AwdgWhLIchlz1j2FcjHJjYXviJUQgO1EGhuobYdfw\r\nxK3yU7VpKkmzXVjmcc7jzsj3ICWN3vBsL4PdHah6ZUF0KhQfImtBa18+hs3i\r\nlxpc1SEAMHCMjeIFeXrqnYRqItoxPgvyErAEG6OpWD2E36a5dYCJWYogr2WN\r\nsM4xKeyhXL51Z1G8QChGJGU6j6k3S7Uh+7euthU2vVVQWkzIV/5+uRcU8aQf\r\nIrgpArVpWyO5RDw2vhdtajTmWBKTahLcOUaIwYflzdeaV1qn7jsAegSSShuI\r\npfbcsXRpgvAS57sHXKaLQvgt3O6+usB1/jA=\r\n=DnUe\r\n-----END PGP SIGNATURE-----\r\n"
}

Repository

PENDING
tradingview/lightweight-charts

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:44 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:835148368b9f7ecd3ad0efef05f72efdba72be2e748f1acc9fa231679f54c8a2

Other collected versions

View all collected versions →