A high-performance line chart component for WinCC Unified that displays data as connected points along a continuous line. Perfect for visualizing trends, time-series data, and continuous process variables in industrial automation and SCADA applications.
Overview
The Line Chart component provides smooth, real-time trend visualization with optional area fill capability. Built on Chart.js, it integrates seamlessly with WinCC Unified runtime to display process data, historical trends, and dynamic measurements with professional styling and responsive performance.
Component Type
Data Visualization Control / Trend Display
Properties
Title
Type: string
Category: Appearance
Description: The text displayed at the top of the chart
Usage: Set this property to identify the trend or data series being visualized
Default: "Line Chart"
Example: "Temperature Trend", "Production Rate Over Time", "Pressure History"
Data
Type: Array<DataPoint>
Category: Data
Description: Array of numeric data points to be plotted as connected line segments
Usage: Bind this property to time-series data from PLC tags, historian, or calculated values
Structure: Each data point is an object with a Value property
// Real-time process monitoringData[0].Value = "PLC_1"."TankLevel_T1"Data[1].Value = "PLC_1"."TankLevel_T2"Data[2].Value = "PLC_1"."TankLevel_T3"// Dynamic color based on alarm stateLineColor = (:HighAlarm:) ? 4294901760 : 4278233343// Show fill when in warning stateShowFill = (:WarningState:)
Historical Trend Display
// 24-hour trend with hourly data pointsTitle = "24-Hour Temperature History"// Bind to historian arrayData = (:HistoricalData:)Labels = (:TimeStampLabels:)// Styling for historical reviewChartBackgroundColor = 4278190080 // Black backgroundForegroundColor = 4294967295 // White textLineColor = 4294944000 // Orange lineShowFill = trueFillColor = 1107296255 // Transparent orange (ARGB 66, 255, 128, 0)
Multi-Point Rolling Trend
// Sliding window of last 50 measurementsTitle = "Rolling Pressure Trend (50 samples)"// Update via script to maintain fixed window size// In update script:// Data.shift() // Remove oldest// Data.push({ Value: newValue }) // Add newest
Color Format Reference
WinCC Unified uses 32-bit ARGB color values:
Format: 0xAARRGGBB
A: Alpha (transparency) - 00 (transparent) to FF (opaque)
R: Red component - 00 to FF
G: Green component - 00 to FF
B: Blue component - 00 to FF
Conversion Formula:
DecimalValue = (A * 16777216) + (R * 65536) + (G * 256) + B
Common Solid Colors:
Black: 4278190080 (0xFF000000)
White: 4294967295 (0xFFFFFFFF)
Red: 4294901760 (0xFFFF0000)
Green: 4278255360 (0xFF00FF00)
Blue: 4278190335 (0xFF0000FF)
Orange: 4294944000 (0xFFFFA500)
Semi-Transparent Colors for Fills:
25% Blue: 671088895 (0x28000FF)
50% Red: 2147483648 (0x80FF0000)
40% Green: 1090519039 (0x4100FF00)
Best Practices
Data Management
Keep Data and Labels arrays synchronized in length
For time-series trends, maintain consistent time intervals
Limit visible data points to 100 for optimal performance
Consider implementing rolling window for continuous trends
Color Selection
Use LineColor that contrasts well with ChartBackgroundColor
For ShowFill, use semi-transparent FillColor (alpha 40-100)
Match LineColor to process status (green=normal, red=alarm, orange=warning)
Ensure ForegroundColor provides readable text and grid lines
Performance Optimization
Update Data at reasonable intervals (100-500ms minimum)
Use change-on-change triggers rather than cyclic updates