{"_id":"@aliyun-sls/uplot","_rev":"13-1a46cfef0ea0f789f7ecab389a2f3134","name":"@aliyun-sls/uplot","dist-tags":{"latest":"1.6.17"},"versions":{"1.6.17":{"name":"@aliyun-sls/uplot","version":"1.6.17","keywords":["micro","time","series","line","area","trend","bar","ohlc","plot","chart","graph"],"author":{"name":"Leon Sorokin","email":"leeoniya@gmail.com"},"license":"MIT","_id":"@aliyun-sls/uplot@1.6.17","maintainers":[{"name":"sanjdw","email":"290506494@qq.com"},{"name":"yuecjnadt","email":"yuecjn@gmail.com"},{"name":"perezyuan","email":"yzmspirit@gmail.com"}],"homepage":"https://github.com/leeoniya/uPlot#readme","bugs":{"url":"https://github.com/leeoniya/uPlot/issues"},"dist":{"shasum":"32eefc1dacbd2fadd0e1cdfd4e50abd928c5e919","tarball":"https://registry.npmjs.org/@aliyun-sls/uplot/-/uplot-1.6.17.tgz","fileCount":9,"integrity":"sha512-zwzJGXp1qjk+33kuftyC0S40+gnKynN3XBSLsw3I18CVz9tK1YarY5T+LNMnXMPYf7YcnYkqnzL3qsfJT0ObxQ==","signatures":[{"sig":"MEYCIQDkKg5ijkyobSqyZWrVnZhI4UeSGVOi0qVz97xp8kJgOgIhAMCZL3xOZbJabzhViBwTL/YDswnV1AnX/PpKXS0CJaEe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":457346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnj+/CRA9TVsSAnZWagAAlyQP/3b8ACr7Bu+K04BIpOaP\nN4SKHKfvp+QWl//MmmIKqqLvopPe/R9zCLy7kd5sPxw5csdSctDZGhrPeLfu\nTaKiCLoMaG92KV0ClrVV1eV2kQassb4fwmLd+G/p08NC2wqIqyQPFQHVm1RZ\nCLSZXAXG9WjDFIwKIcPwoatZT/twbzHORxwDxJunpTXb4FwGB23JLbeiURus\nVoYMLw+VysjBNKj6JurfYeDrS92RIno0pCMqhSOSicNiC744vWrb6RmNdsIq\nYETPjMlf5a/qxPcw87JgtYRSSkmtR+x8fW1S5u2N6ARpwF8cbieD3643u8f4\n6ET09/nh9+lxzPHSp8hc3eQ4LJUjuzse+6IkgXt8n3AAYfVFs63h9fAEWmUn\nHXY8U1i4dPN4p5bvXSdyi3VBN44vCVf1mkvWctXge8MtLd9OLFXDc2dNuCQR\nO7zFtcZMjRIe6uCX0lFT0il0/RHKUiTUISZXkZ+UekQ4LSFh9ec2vvva+axi\npstLm0nIl6zv2HSj05IA9fJyRVs1hgx990m0rUlPgn40n0sEmMWkhSMNWGxl\nAtY7qzwOGgolD0DQ+7LWS2YBNdCQj5TUHlczdxWV3kV2qZ/aT3Kp2Akl5nZX\n83wDiEQjpA0OmU5jZnr2GepWP5DVArZeYyuctSv3W64lDCGyYuXUME1huMjP\nD6X8\r\n=Uyc8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/uPlot.cjs.js","module":"./dist/uPlot.esm.js","gitHead":"468b3b325d2f35819e9827c7a0249411ffab9532","scripts":{"pub":"npm publish --access public","test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c"},"typings":"./dist/uPlot.d.ts","_npmUser":{"name":"yuecjnadt","email":"yuecjn@gmail.com"},"repository":{"url":"git+https://github.com/leeoniya/uPlot.git","type":"git"},"_npmVersion":"6.14.8","description":"A small, fast chart for time series, lines, areas, ohlc & bars","directories":{},"_nodeVersion":"14.15.0","_hasShrinkwrap":false,"devDependencies":{"rollup":"^2.60.0","rollup-plugin-terser":"^7.0.2"},"_npmOperationalInternal":{"tmp":"tmp/uplot_1.6.17_1637760958937_0.22923827014981413","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-11-24T13:35:58.885Z","modified":"2025-04-07T06:32:55.818Z","1.6.17":"2021-11-24T13:35:59.134Z"},"bugs":{"url":"https://github.com/leeoniya/uPlot/issues"},"author":{"name":"Leon Sorokin","email":"leeoniya@gmail.com"},"license":"MIT","homepage":"https://github.com/leeoniya/uPlot#readme","keywords":["micro","time","series","line","area","trend","bar","ohlc","plot","chart","graph"],"repository":{"url":"git+https://github.com/leeoniya/uPlot.git","type":"git"},"description":"A small, fast chart for time series, lines, areas, ohlc & bars","maintainers":[{"email":"yuecjn@gmail.com","name":"yuecjnadt"},{"email":"ruiqi.hy@alibaba-inc.com","name":"ruiqi.hy"},{"email":"1581024375@qq.com","name":"nosmilen"},{"email":"qinghaotu@126.com","name":"7678tqh"}],"readme":"## 📈 μPlot\n\nA small ([~40 KB min](https://github.com/leeoniya/uPlot/tree/master/dist/uPlot.iife.min.js)), [fast](#performance) chart for time series, lines, areas, ohlc & bars _(MIT Licensed)_\n\n---\n### Introduction\n\nμPlot is a [fast, memory-efficient](#performance) [Canvas 2D](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D)-based chart for plotting [time series](https://en.wikipedia.org/wiki/Time_series), lines, areas, ohlc & bars; from a cold start it can create an interactive chart containing 150,000 data points in 135ms, scaling linearly at [~25,000 pts/ms](https://leeoniya.github.io/uPlot/bench/uPlot-10M.html). In addition to fast initial render, the zooming and cursor performance is by far the best of any similar charting lib; at ~40 KB, it's likely the smallest and fastest time series plotter that doesn't make use of [context-limited](https://bugs.chromium.org/p/chromium/issues/detail?id=771792) WebGL shaders or WASM, both of which have much higher startup cost and code size.\n\n<h3 align=\"center\">166,650 point bench: <a href=\"https://leeoniya.github.io/uPlot/bench/uPlot.html\">https://leeoniya.github.io/uPlot/bench/uPlot.html</a></h3>\n\nHowever, if you need 60fps performance with massive streaming datasets, uPlot [can only get you so far](https://huww98.github.io/TimeChart/docs/performance).\nWebGL should still be the tool of choice for applications like realtime signal or waveform visualizations:\nSee [danchitnis/webgl-plot](https://github.com/danchitnis/webgl-plot), [huww98/TimeChart](https://github.com/huww98/TimeChart), [epezent/implot](https://github.com/epezent/implot), or commercial products like [LightningChart®](https://www.arction.com/lightningchart-js/).\n\n---\n![uPlot Chart](uPlot.png \"uPlot Chart\")\n\n---\n### Features\n\n- Multiple series w/toggle\n- Multiple y-axes, scales & grids\n- Temporal or numeric x-axis\n- Linear, uniform or [logarithmic](https://leeoniya.github.io/uPlot/demos/log-scales.html) scales\n- Line & Area styles (stroke, fill, width, dash)\n- Pluggable path renderers [linear, spline, stepped, bars](https://leeoniya.github.io/uPlot/demos/line-paths.html)\n- Zoom with auto-rescale\n- Legend with live values\n- Support for [IANA Time Zone Names](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) & DST\n- [Support for missing data](https://leeoniya.github.io/uPlot/demos/missing-data.html)\n- [Cursor sync for multiple charts](https://leeoniya.github.io/uPlot/demos/sync-cursor.html)\n- [Focus closest series](https://leeoniya.github.io/uPlot/demos/focus-cursor.html)\n- [Data streaming (live update)](https://leeoniya.github.io/uPlot/demos/stream-data.html)\n- [High / Low bands](https://leeoniya.github.io/uPlot/demos/high-low-bands.html)\n- A lean, consistent, and powerful API with hooks & plugins\n\n---\n### Non-Features\n\nIn order to stay lean, fast and focused the following features will not be added:\n\n- No data parsing, aggregation, summation or statistical processing - just do it in advance. e.g. https://simplestatistics.org/, https://www.papaparse.com/\n- No transitions or animations - they're always pure distractions.\n- No collision avoidance for axis tick labels, so may require manual tweaking of spacing metrics if label customization significiantly increases default label widths.\n- No stacked series: see [\"Stacked Area Graphs Are Not Your Friend\"](https://everydayanalytics.ca/2014/08/stacked-area-graphs-are-not-your-friend.html) and a [horrific demo](https://leeoniya.github.io/uPlot/demos/stacked-series.html). While smooth spline interpolation is available, its use is strongly discouraged: [Your data is misrepresented!](http://www.vizwiz.com/2011/12/when-you-use-smoothed-line-chart-your.html). Both visualizations are terrible at accurately communicating information.\n- No built-in drag scrolling/panning due to ambiguous native zoom/selection behavior. However, this can be added externally via the plugin/hooks API: [zoom-wheel](https://leeoniya.github.io/uPlot/demos/zoom-wheel.html), [zoom-touch](https://leeoniya.github.io/uPlot/demos/zoom-touch.html).\n\n---\n### Documentation (WIP)\n\nThe docs are a perpetual work in progress, it seems.\nStart with [/docs/README.md](https://github.com/leeoniya/uPlot/tree/master/docs) for a conceptual overview.\nThe full API is further documented via comments in [/dist/uPlot.d.ts](https://github.com/leeoniya/uPlot/blob/master/dist/uPlot.d.ts).\nAdditionally, an ever-expanding collection of runnable [/demos](https://leeoniya.github.io/uPlot/demos/index.html) covers the vast majority of uPlot's API.\n\n---\n### Third-party Integrations\n\n- [Jupyter widget](https://github.com/sohailsomani/uplot_jupyter_widget) (Sohail Somani)\n- [React and Vue.js](https://github.com/skalinichev/uplot-wrappers) (Sergey Kalinichev)\n\n---\n### Performance\n\nBenchmarks done on this hardware:\n\n- Date: 2021-04-24\n- Windows 10 x64, Chrome 90.0.4430.85 (64-bit)\n- Core i7-8700 @ 3.2GHz, 16GB RAM\n- AMD Radeon RX480, 2560x1440 res\n\n![uPlot Performance](perf.png \"uPlot Performance\")\n\nFull size: https://leeoniya.github.io/uPlot/demos/multi-bars.html\n\nRaw data: https://github.com/leeoniya/uPlot/blob/master/bench/results.json\n\n<pre>\n| lib                    | size    | done    | js,rend,paint,sys | heap peak,final | mousemove (10s)     |\n| ---------------------- | ------- | ------- | ----------------- | --------------- | ------------------- |\n| <a href=\"https://leeoniya.github.io/uPlot/bench/uPlot.html\">uPlot v1.6.9</a>           |   39 KB |   58 ms |   70   1   1   38 |  20 MB   3 MB   |   65  159   88  103 |\n| <a href=\"https://leeoniya.github.io/uPlot/bench/ECharts5.html\">ECharts v5.1.0</a>         |  987 KB |   88 ms |   87   1   1   47 |  55 MB   5 MB   | 1463  284   84  521 |\n| <a href=\"https://leeoniya.github.io/uPlot/bench/Chart.js3.html\">Chart.js v3.2.0</a>        |  233 KB |   80 ms |  118   1   1   41 |  34 MB  11 MB   |  725   30   57 1467 |\n| <a href=\"https://leeoniya.github.io/uPlot/bench/Flot.html\">Flot v3.0.0</a>            |  494 KB |   91 ms |  118   3   1   55 |  46 MB  16 MB   | ---                 |\n| <a href=\"https://leeoniya.github.io/uPlot/bench/LightningChart.html\">LightningChart® v2.2.1</a> | 1000 KB |  --- ms |  178   2   1   42 |  61 MB  22 MB   | 5310   46   43  180 |\n| <a href=\"https://leeoniya.github.io/uPlot/bench/dygraphs.html\">dygraphs v2.1.0</a>        |  125 KB |  135 ms |  159   2   1   75 |  99 MB  44 MB   | 1087  162   74  205 |\n| <a href=\"https://leeoniya.github.io/uPlot/bench/CanvasJS.html\">CanvasJS v3.2.13</a>       |  482 KB |  241 ms |  271   2   1   66 |  52 MB  26 MB   |  961  256   76  195 |\n| <a href=\"https://leeoniya.github.io/uPlot/bench/Highcharts.html\">Highcharts v9.0.1</a>      |  391 KB |  --- ms |  286   4   2   42 | 108 MB  33 MB   |  840  301  132  155 |\n| <a href=\"https://leeoniya.github.io/uPlot/bench/dvxCharts.html\">dvxCharts v5.0.0</a>       |  369 KB |  253 ms |  310  18   1   51 |  60 MB  24 MB   |  674  442  148  145 |\n| <a href=\"https://leeoniya.github.io/uPlot/bench/Plotly.js.html\">Plotly.js v1.58.4</a>      | 3500 KB |  377 ms |  408   5   1   71 | 199 MB  46 MB   | 1087  114   29   82 |\n| <a href=\"https://leeoniya.github.io/uPlot/bench/Chart.js2.html\">Chart.js v2.9.4</a>        |  245 KB |  495 ms |  524   2   1   75 | 103 MB  54 MB   | 8397    5    6 1158 |\n| <a href=\"https://leeoniya.github.io/uPlot/bench/ECharts4.html\">ECharts v4.9.0</a>         |  785 KB |  366 ms |  498   1   1  581 | 224 MB  78 MB   | 2265   64   17 7551 |\n| <a href=\"https://leeoniya.github.io/uPlot/bench/ApexCharts.html\">ApexCharts v3.26.1</a>     |  478 KB |  --- ms | 1634  22   1   44 | 332 MB  70 MB   | 8611  646   99  154 |\n| <a href=\"https://leeoniya.github.io/uPlot/bench/ZingChart.html\">ZingChart v2.9.3</a>       |  857 KB | 2081 ms | 2101   5   1   38 | 191 MB 100 MB   | ---                 |\n| <a href=\"https://leeoniya.github.io/uPlot/bench/amCharts.html\">amCharts v4.10.18</a>      | 1200 KB | 5564 ms | 4925  19   6   67 | 695 MB 237 MB   | 1494  336  164  285 |\n</pre>\n\nNormally, all libs are updated to their latest versions before each benchmark round. However, libraries which show significant performance improvements in latest versions will have prior versions shown to encourage migration; this is especially true for still-widely-deployed libs, such as Chart.js v2.9.4, and ECharts v4.9.0. Deployment prevalence is assessed from public npm and CDN download stats for the prior few months.\n\n- libs are sorted by their initial, cold-start, render performance (excluding network transfer time to download the lib)\n- `size` includes the lib itself plus any dependencies required to render the benchmark, e.g. Moment, jQuery, etc.\n- Flot does not make available any minified assets and all their examples use the uncompressed sources; they also use an uncompressed version of jQuery :/\n\nSome libraries provide their own performance demos:\n\n- https://echarts.apache.org/next/examples/en/index.html\n- https://github.com/sveinn-steinarsson/flot-downsample/\n- https://dygraphs.com/tests/dygraph-many-points-benchmark.html\n- https://www.chartjs.org/docs/latest/general/performance.html\n- https://dash.plotly.com/performance\n- https://www.highcharts.com/docs/advanced-chart-features/boost-module\n- https://danchitnis.github.io/webgl-plot-examples/vanilla/\n- https://huww98.github.io/TimeChart/docs/performance\n- https://www.arction.com/lightningchart-js-performance/\n\nTODO (all of these use SVG, so performance should be similar to Highcharts):\n\n- Chartist.js\n- d3-based\n  - C3.js\n  - dc.js\n  - MetricsGraphics\n  - rickshaw\n\n---\n### Acknowledgements\n\n- Dan Vanderkam's [dygraphs](https://github.com/danvk/dygraphs) was a big inspiration; in fact, my stale [pull request #948](https://github.com/danvk/dygraphs/pull/948) was a primary motivator for μPlot's inception.\n- Adam Pearce for [#15 - remove redundant lineTo commands](https://github.com/leeoniya/uPlot/issues/15).\n","readmeFilename":"README.md"}