JavaScript Sweeping Line Chart Dashboard - Editor

This interactive example with the code editor shows a sweeping ECG line chart created with LightningChart JS library. You can experiment with the variables and parameters to see how the library performs using our online code editor.

Sweeping line chart functionality is not built-in in the library. However, it is entirely possible to create performant and visually appealing sweeping line applications with LightningChart JS. Performance is unaffected, but the application code is slightly more complex than the scrolling axis. Some built-in features are also inapplicable, such as real-time axis ticks and glow effects.

This example displays 6 ECG channels, each with a 1000 Hz frequency.

Stress testing has concluded that even 100s of such high-frequency channels can be displayed at the same time. To squeeze more GPU performance out, you can try setting line series thickness to -1 for the best performance.


A simplified version of sweeping charts can be found in this example.

These two examples have slightly different approaches to realizing the sweeping display, each having their own advantages and disadvantages:

A) This example, "sweeping line dashboard"

  • Extremely performant, recommended for extremely performance demanding applications with 100+ channels and 10+ kHz stream rates.

  • Relatively complicated application code, having to manage multiple series instances per trend and rectangle overlays to hide old data.

  • Some chart features are not supported, such as: axis ticks, series glow/drop shadow effects, gradient backgrounds.

B) "sweeping line chart" example

Found here

  • Less performant, works up to 100 channels and 1 kHz stream rate. If less channels can work with higher stream rates too. Just more CPU intensive than the other approach.

  • Very simple to implement and maintain.

  • No limitations to chart features - axis ticks, cursors, effects, backgrounds all work as normally.