Industrial Alarm Monitoring Application with LightningChart Python
Tutorial
Assisted by AI
Learn how to create a Python industrial alarm monitoring application with real-time and high-performance charts.
Introduction to the Project
In the industrial field, we always have a huge amount of data through different events like alarms. It is crucial for them to monitor these events to maintain standards, detect anomalies and keeping everything safe. This article demonstrates an industrial alarm monitoring application using LightningChart Python to visualize static and real-time streaming alarm data through different charts and dashboards.
LightningChart Python
LightningChart Python is a powerful visualization library that is capable of visualizing real-time and interactive charts with large datasets efficiently. For this project, LightningChart provided visual insight into alarm severity, machine learning analysis and uncertainty bands through different interesting charts like line series, heatmaps, stacked bar charts, bubble charts, pie chart and 3D area chart.
Setting Up Python Environment
Before running the project, install Python and the other required libraries using:
pip install pandas numpy scikit-learn xgboost shap lightningchart smote-variants
Several Python libraries were employed in this article:
- Pandas: For loading, cleaning, and structuring data..
- NumPy: For numerical operations.
- Scikit-learn: Provided machine learning tools like XGBoost for classification, SMOTE for handling imbalanced datasets, Isolation Forest for anomaly detection, and RobustScaler for data normalization.
- LightningChart: To create interactive visualizations.
Setting Up Your Development Environment
- Set up a virtual environment:
python -m venv env
source env/bin/activate # On Windows use `env\Scripts\activate`
- Use Visual Studio Code (VSCode) for a streamlined development experience.
Visualizing Data with LightningChart Python
Here are some examples codes and charts that shows how we created key visualizations:
Real-Time Alarm Prediction with XGBoost
In the first row of dashboard, we can see real time prediction chart, it first starts predicting two values and connect them with the red line. after a few seconds it would show actual values with yellow line and at the same time model turns the old red line to orange and start predicting two new values and connecting them. In the right side we have alarm counter and below it we can see level of alarm severity. In the second row we can see the real-time certainty heatmap.
xgb_model = XGBClassifier(random_state=42, use_label_encoder=False, eval_metric='logloss')
xgb_model.fit(X_train_clean, y_train_clean)
y_pred = xgb_model.predict(X_test)
Ensemble Model & Uncertainty Visualization
Here in this dashboard, we can see uncertainty chart for different classes.
seeds = [42, 123, 999, 31415, 2718]
models_list = []
for seed in seeds:
model_ens = XGBClassifier(random_state=seed, subsample=0.8, colsample_bytree=0.8)
model_ens.fit(X_boot, y_boot)
models_list.append(model_ens)
Exploratory Data Visualization Dashboard
Charts in dashboard focus on showing alarm severity in different ways. We have alarm severity distribution in pie chart, stacked bar charts show alarm class distribution, heatmap demonstrates alarms by day and hour, bubble chart showing severity over time and 3D surface chart displaying alarm frequency by day of week and hour.
severity_counts = df["AlarmSeverityName"].value_counts()
pie_chart.add_slices([{'name': sev, 'value': int(count)} for sev, count in severity_counts.items()])
Conclusion
This project demonstrates how we could use LightningChart Python to visualize and monitor industrial alarm data. This approach gives us a powerful insight into system behaviors, alarm severity levels, and maintenance needs. Benefits of LightningChart Python specifically in this project include:
- Real-time visualization capabilities allowing live monitoring.
- Versatile chart options facilitating detailed and multi-dimensional data analysis.
- High-performance rendering suited for complex and large datasets specially in industrial environments.
Continue learning with LightningChart
Best OxyPlot Alternative in 2026: GPU Rendering, 3D Charts, Commercial Support
OxyPlot has been a reliable reference point in the .NET scientific and engineering charting space for over a decade. MIT-licensed, platform-neutral in its rendering model (which is how it achieves coverage across WPF, WinForms, Xamarin, Avalonia, and MAUI from a...
7 Best Plotly.js Alternatives in 2026: Faster, Lighter, No Context Limits
Plotly.js holds a unique position in the JavaScript charting ecosystem. Data scientists already know it from Python, when Plotly.py generates a chart in a Jupyter notebook, it's Plotly.js rendering it in the browser. That continuity between languages is genuinely...
7 Best Highcharts Alternatives in 2026: Faster, Cheaper, and More Capable
Highcharts has been a reliable workhorse for enterprise JavaScript charts since 2009. Solid documentation, broad chart type coverage, WCAG accessibility that's genuinely best-in-class. A lot of teams have built a lot of dashboards on it over the years. But teams also...

