javascript charts performance comparison - line charts
TRANSCRIPT
1(16)
JavaScript Charts Performance Comparison / Line Charts
Test date May 5th, 2021
Foreword
This is a performance test / comparison of JavaScript charts. The tests are focusing on line charts’ real-
time performance, initial rendering delay, RAM consumption and JavaScript thread blocking time. The
charts selected in this test, are the major manufacturers who claim their charts to be high-
performance oriented or the fastest, and some open-source libraries. There are also other charts
available, which are either end-of-life, not supported anymore, or simply don’t work. They were
excluded. We are confident we have selected all the fastest charts in the comparison, and if we did not,
inform us to get it added in this test.
The bias in this test is in progressive line charts, needed typically in medical applications (ECG / EEG /
ExG), seismography, telemetry, industrial automation, vibration research and audio engineering,
and real-time trading data applications.
2(16)
Test procedure
The test project is published as open-source project in Github.
The goal was to create a scrolling line chart. Data is appended to the tail of the line series, and X axis
then scrolled to show the new data, and make the oldest data fall out.
The tests were made according to examples and tutorials and contacting manufacturers’ support
teams whenever available. We strongly believe all of them have been made in optimal way for all of
them, and if you notice any problem or wrong configuring of them, please contact us for a fix.
The appearances of the chart were set to simplistic, and line series stroke widths were set to 2 pixels
wide, which is a typical value for line charts.
3(16)
Test hardware setups
The test was carried out with the following setups.
1. Fast desktop PC:
• CPU: AMD Ryzen 9 5900X processor
• GPU: Nvidia GeForce RTX 3080
• RAM 16 GB
• 2560 x 1440 resolution, 165 Hz
2. Low-end desktop PC:
• CPU: AMD Ryzen 5 2600 Six-core processor
• GPU: NVIDIA GeForce GTX 1050 Ti
• RAM: 8 GB
• 1920x1080 Full-HD resolution, 60 Hz
3. Low-end business laptop, with touch-screen, Lenovo Yoga
• CPU: Intel Core i7-8550U CPU 1,80 GHz
• GPU: Intel UHD Graphics 620
• RAM: 8 GB
• 1920x1080 Full-HD resolution, 60 Hz
4(16)
Tested chart libraries (in no particular order)
• LightningChart® JS 3.0.0
• AmCharts v.4
• ZingChart 2.9.3
• HighChart (Boost module enabled) v.9.1.0
• DvxCharts v.5.0.0.0
• Dygraphs v.2.1.0
• µPlot v.1.6.8
• AnyChart v. 8.9.0
• ECharts v.5
• Plotly.js v.1.58.4
• SciChart JS v.1.4.1578
• Canvas.js v.3.2.16
What did we measure?
1. Initial rendering delay
The required time for rendering the immediately displayed data set (full X axis view). It does not
include time required for initializing chart or series. Smaller delay is better.
2. FPS
Frames Per Second is the true performance indicator. How many times per second the chart
refreshes. Higher the value, the more pleasant it is to the eye. Low frame rate causes
stutter/twitching/jerking. Even with high frame rate, the twitching can be observed in most of
the libraries, therefore high FPS + stable refresh interval provides the smoothest visual
experience.
5(16)
3. Timeout delay
The delay the chart updates is blocking the JavaScript event queue. Smaller the better.
4. Heap Size (MB)
Memory requirement from Browser’s heap. This can be important if having several charts in the
same application, and memory is needed for other purposes.
Results
The results were output to Google Chrome browser Console, and constructed into CSV data,
and imported to Excel.
The green color represents good value, yellow mediocre, and red… it indicates either slowness
or bright red a fail.
The FPS rates are visualized with bars inside the cells, too.
6(16)
High-end desktop:
Test Library Initial rendering delay (ms)
Smaller is better
FPS avg
Bigger is better
Timeout delay avg (ms)
Smaller is better
Heap size avg (MB)
Smaller is better
LightningChart® JS 28 164.1 5 24
Competitor A 66 164.9 6 100
Competitor B 16 164 6 23
Competitor C 32 129.5 8 57
Competitor D 57 24.9 49 17
Competitor E 10 160.6 8 11
Competitor F 26 42.6 24 23
Competitor G 10 153.2 7 14
Competitor H 28 52.7 22 56
Competitor I 53 163.7 5 17
Competitor J 219 6.2 346 12
Competitor K 224 124.3 8 26
LightningChart® JS 23 164.7 5 22
Competitor A 65 163.9 6 106
Competitor B 42 88.6 21 52
Competitor C 61 98.3 12 77
Competitor D 89 20.3 78 25
Competitor E 42 86.3 15 11
Competitor F 49 40.8 25 37
Competitor G 31 72.2 14 38
Competitor H 46 17.5 105 88
Competitor I 119 119.9 7 58
Competitor J 305 5 441 15
Competitor K 485 7.3 136 570
LightningChart® JS 34 164.7 5 29
Competitor A 61 141 15 123
Competitor B 167 15.1 128 154
Competitor C 150 28.6 34 879
Competitor D 288 8.9 250 144
Competitor E 58 39.5 36 13
Competitor F 94 20.6 50 110
Competitor G 143 14.5 79 76
Competitor H 153 4.3 784 327
Competitor I 539 0.7 585 76
Competitor J 555 3 699 29
Competitor K 1719 1.5 819 188
LightningChart® JS 989 162.2 5 927
Competitor A 1934 4.6 624 832
Competitor B FAIL FAIL FAIL FAIL
Competitor C 2336 7.5 145 1413
Competitor D 13949 FAIL 12941 1972
Competitor E FAIL FAIL FAIL FAIL
Competitor F FAIL FAIL FAIL FAIL
Competitor G FAIL FAIL FAIL FAIL
Competitor H FAIL FAIL FAIL FAIL
Competitor I FAIL FAIL FAIL FAIL
Competitor J FAIL FAIL FAIL FAIL
Competitor K FAIL FAIL FAIL FAIL
LightningChart® JS 2136 154.4 5 1810
Competitor A 2301 2 1368 1333
Competitor B FAIL FAIL FAIL FAIL
Competitor C 4020 6 176 1806
Competitor D FAIL FAIL FAIL FAIL
Competitor E FAIL FAIL FAIL FAIL
Competitor F FAIL FAIL FAIL FAIL
Competitor G FAIL FAIL FAIL FAIL
Competitor H FAIL FAIL FAIL FAIL
Competitor I FAIL FAIL FAIL FAIL
Competitor J FAIL FAIL FAIL FAIL
Competitor K FAIL FAIL FAIL FAIL
LightningChart® JS 1083 144.6 6 1271
Competitor A FAIL FAIL FAIL FAIL
Competitor B FAIL FAIL FAIL FAIL
Competitor C FAIL FAIL FAIL FAIL
Competitor D FAIL FAIL FAIL FAIL
Competitor E FAIL FAIL FAIL FAIL
Competitor F FAIL FAIL FAIL FAIL
Competitor G FAIL FAIL FAIL FAIL
Competitor H FAIL FAIL FAIL FAIL
Competitor I FAIL FAIL FAIL FAIL
Competitor J FAIL FAIL FAIL FAIL
Competitor K FAIL FAIL FAIL FAIL
LightningChart® JS 1174 70.2 20 1333
Competitor A FAIL FAIL FAIL FAIL
Competitor B FAIL FAIL FAIL FAIL
Competitor C FAIL FAIL FAIL FAIL
Competitor D FAIL FAIL FAIL FAIL
Competitor E FAIL FAIL FAIL FAIL
Competitor F FAIL FAIL FAIL FAIL
Competitor G FAIL FAIL FAIL FAIL
Competitor H FAIL FAIL FAIL FAIL
Competitor I FAIL FAIL FAIL FAIL
Competitor J FAIL FAIL FAIL FAIL
Competitor K FAIL FAIL FAIL FAIL
10ch 1000000 dp/s
1ch 1000 dp/s
1ch 10000 dp/s
10ch 10000 dp/s
10ch 100000 dp/s
20ch 100000 dp/s
10ch 500000 dp/s
7(16)
FPS rates of different charts with different data rates, high-end desktop. Empty bar means: unable to
render, fail.
8(16)
Low-end desktop:
Test Library Initial rendering delay
(ms)
Smaller is better
FPS avg
Bigger is better
Timeout delay avg (ms)
Smaller is better
Heap size avg (MB)
Smaller is better
LightningChart® JS 47 60.1 5 19
Competitor A 70 60.1 7 94
Competitor B 23 60.2 6 16
Competitor C 60 59 10 35
Competitor D 76 29.7 42 12
Competitor E 51 60 6 4
Competitor F 35 48.8 21 12
Competitor G 19 59.8 7 8
Competitor H 45 42.1 29 43
Competitor I 104 59.7 6 13
Competitor J 109 19.8 118 8
Competitor K 367 57.9 14 21
LightningChart® JS 43 60.3 5 17
Competitor A 81 60.3 9 104
Competitor B 77 55.8 21 41
Competitor C 109 54.6 17 45
Competitor D 138 21.3 94 24
Competitor E 34 59.8 10 5
Competitor F 60 48.2 20 23
Competitor G 55 56.4 18 22
Competitor H 77 12.1 194 74
Competitor I 210 15.3 27 56
Competitor J 226 10.2 196 10
Competitor K 733 3.1 391 52
LightningChart® JS 74 60.2 5 181
Competitor A 70 49.8 40 119
Competitor B 308 8.5 213 131
Competitor C 273 16.3 60 42
Competitor D 482 5.3 525 111
Competitor E 113 31.9 49 8
Competitor F 159 17.9 57 73
Competitor G 206 9.3 125 67
Competitor H 261 2.2 1441 252
Competitor I 980 FAIL 797 108
Competitor J 663 2.8 682 35
Competitor K 2849 1.5 738 73
LightningChart® JS 2520 55.1 6 907
Competitor A 1424 1.9 1465 765
Competitor B FAIL FAIL FAIL FAIL
Competitor C 3340 4.3 275 1031
Competitor D FAIL FAIL FAIL FAIL
Competitor E FAIL FAIL FAIL FAIL
Competitor F FAIL FAIL FAIL FAIL
Competitor G FAIL FAIL FAIL FAIL
Competitor H FAIL FAIL FAIL FAIL
Competitor I FAIL FAIL FAIL FAIL
Competitor J FAIL FAIL FAIL FAIL
Competitor K FAIL FAIL FAIL FAIL
LightningChart® JS 4812 49 20 1409
Competitor A 2500 0.8 3209 1246
Competitor B FAIL FAIL FAIL FAIL
Competitor C FAIL FAIL FAIL FAIL
Competitor D FAIL FAIL FAIL FAIL
Competitor E FAIL FAIL FAIL FAIL
Competitor F FAIL FAIL FAIL FAIL
Competitor G FAIL FAIL FAIL FAIL
Competitor H FAIL FAIL FAIL FAIL
Competitor I FAIL FAIL FAIL FAIL
Competitor J FAIL FAIL FAIL FAIL
Competitor K FAIL FAIL FAIL FAIL
20ch 100000 dp/s
1ch 1000 dp/s
1ch 10000 dp/s
10ch 10000 dp/s
10ch 100000 dp/s
9(16)
FPS rates of different charts with different data rates, low-end desktop. Empty bar means: unable to
render, fail.
10(16)
Low-end laptop:
Test Library Initial rendering delay (ms)
Smaller is better
FPS avg
Bigger is better
Timeout delay avg (ms)
Smaller is better
Heap size avg (MB)
Smaller is better
LightningChart® JS 93 58.2 11 23
Competitor A 72 46.6 28 93
Competitor B 27 59.3 7 21
Competitor C 68 40.8 28 31
Competitor D 89 24.3 78 17
Competitor E 65 59.8 7 19
Competitor F 62 32.8 32 8
Competitor G 18 59.3 10 8
Competitor H 82 23.8 79 35
Competitor I 149 54.3 6 19
Competitor J 119 15.3 125 12
Competitor K 533 38.2 30 26
LightningChart® JS 66 58.6 12 20
Competitor A 122 38 31 95
Competitor B 123 33.5 41 40
Competitor C 112 31.1 39 39
Competitor D 179 20.4 99 33
Competitor E 45 50.6 16 19
Competitor F 75 29.9 33 19
Competitor G 81 28.6 43 17
Competitor H 86 7.6 326 75
Competitor I 347 1.4 544 42
Competitor J 275 9.8 184 14
Competitor K 883 2 722 48
LightningChart® JS 103 56.3 12 42
Competitor A 70 30 93 126
Competitor B 438 5.6 318 142
Competitor C 459 10.6 133 40
Competitor D 648 3.1 688 123
Competitor E 116 26.5 69 22
Competitor F 249 11.2 115 52
Competitor G 316 4.6 305 70
Competitor H 455 1.5 1980 244
Competitor I FAIL FAIL FAIL FAIL
Competitor J 1072 2.1 906 38
Competitor K FAIL FAIL FAIL FAIL
LightningChart® JS 4724 32.4 33 837
Competitor A 1731 1 2145 814
Competitor B FAIL FAIL FAIL FAIL
Competitor C 5108 2.2 647 969
Competitor D FAIL FAIL FAIL FAIL
Competitor E FAIL FAIL FAIL FAIL
Competitor F FAIL FAIL FAIL FAIL
Competitor G FAIL FAIL FAIL FAIL
Competitor H FAIL FAIL FAIL FAIL
Competitor I FAIL FAIL FAIL FAIL
Competitor J FAIL FAIL FAIL FAIL
Competitor K FAIL FAIL FAIL FAIL
1ch 1000 dp/s
1ch 10000 dp/s
10ch 10000 dp/s
10ch 100000 dp/s
11(16)
FPS rates of different charts with different data rates, low-end laptop. Empty bar means: unable to render,
fail.
12(16)
Downsampling
Downsampling is used by Competitor C, reducing their overhead and increasing FPS, but they provide
erroneous visualization. Without downsampling, these performance results would have been much
worse.
Correct visualization by LightningChart:
Resampling used by Competitor C, the loss of data details and inaccurate visualization:
Downsampling really should not be used or tolerated by any software supplier making realistic and
believable applications.
13(16)
Other visualization errors
Competitor G produces incorrect visualization (curve looks like it is thicker than it should, or like there
is a lot of noise). In this case, the Y value can't be accurately identified. Additionally, the visualized Y
min/max range is out of the input data bounds (max Y is obviously drawn higher than 5.0). Incorrect
line rendering algorithm.
14(16)
Same ECG data visualized correctly with LightningChart® JS:
Conclusion – which is the fastest JavaScript chart?
Different chart charting libraries have their own strengths and selling points, but LightningChart’s
strength definitely is the exceptional rendering performance, allowing to build very advanced and
data-intensive applications, visualizing progressing line charts.
While almost all charts can provide with sufficient performance with 1000 data points, the differences
really start to show when the data rates and line series counts go up. All charts are just not designed
for these kind of data rates, and their Canvas/HTML5-based rendering is magnitudes slower than
WebGL rendering.
15(16)
LightningChart initial rendering time is smallest or amongst the smallest, runs with very compact
memory footprint (note the amount of data others can’t even handle), with lowest CPU overhead, and
fastest response to mouse interactions, reaching higher usable data point rates than any other chart.
Based on the amounts data can be visualized with over 30 FPS, we can conclude LightningChart JS
is the fastest JavaScript line chart:
• With low-end laptop, LightningChart® JS is about 80 x faster than average of competitors.
• With high-end desktop, LightningChart® JS is roughly 700 x faster than average of competitors,
and 100 x faster than nearest competitor.
• With high-end desktop, LightningChart® JS can keep FPS over 30, with data rates of over 10
million new data points / sec.
0
1000000
2000000
3000000
4000000
5000000
6000000
7000000
8000000
9000000
10000000
Data point count / s, keeping FPS over 30
16(16)
About LightningChart® JS
LightningChart® is registered trademark by Arction Ltd, a pioneer in high-performance charting, who
introduced the fastest, GPU accelerated charts, already in 2009 for Microsoft .NET technologies. Before
that, and ever since, the LightningChart® team has studied different technologies, prototyped,
researched, innovated new algorithms, which are now part of LightningChart® product lines, to
produce the absolute best performance for those advanced applications that really need it.
LightningChart® JS product line was released in 2019 and development is full-time by a large team.
LightningChart® team is ready to help!