Skip to main content
Version: 5.2.0

Electron

Electron is a popular development framework for Desktop applications. It allows you to utilize web technologies for applications that users can install on their personal computers and run like traditional PC applications.

Compared to traditional web applications, Electron applications have some distinct advantages. For example, they have more control over the application window and process resources. They have access to more powerful multithreading capabilities from Node.js and the local filesystem, or even connecting to local databases, peripherals and Bluetooth.

When it comes to handling differences between operating systems and creating installers, Electron does the hard things for you.

What is the best part about Electron? You can make desktop applications and still utilize LightningChart JS for high-performance data visualization.

Using LightningChart JS in Electron

Electron content is generally just normal HTML, JavaScript and CSS. As such, using LightningChart JS is very straightforward. Simply add the library IIFE bundle in your Electron renderer HTML:

<script src="lcjs.iife.js"></script>

And you can start using LightningChart JS without any gimmicks:

const { lightningChart } = lcjs;

const lc = lcjs.lightningChart();
const container = document.getElementById("chart");
const chart = lc.ChartXY({ container })

Example application

We have prepared a small example application with Electron + LightningChart JS. Please find it in GitHub: https://github.com/Arction/lcjs-electron-template

In the above repository you can find more instructions on topics such as:

  • Running the application
  • Building the application to a desktop executable
  • Using a developer license
  • Transferring data from main process to renderer

The application itself produces just a simple scrolling time series line chart, which receives a new random generated data point every 10 milliseconds.

More materials

For latest updates, get in touch.