Skip to content

EU Chart_EN

MIAOKATZE edited this page Jul 12, 2026 · 2 revisions

EU Chart

1. Function Overview

The EU Chart is the core feature of Tab 1 on the Network Info Panel, used to visualize wireless grid energy trends. It simultaneously displays the grid energy level and the EU/t change rate via a dual Y-axis chart, and supports switching between 4 time windows for different time spans.

Network Info Panel EU Chart Network all-weather monitoring illustration
  • Located on Tab 1 of the Network Info Panel (default tab)
  • Dual Y-axis: left axis = grid energy, right axis = EU/t change rate
  • Supports 4 time windows: 5 minutes / 1 hour / 8 hours / 24 hours
  • Brief area shows current energy, average EU/t, realtime EU/t, and grid status
  • Uses Fritsch-Carlson monotone cubic Hermite spline for smooth rendering

Module Relationship: The EU Chart is the Tab 1 feature of the Network Info Panel. For the block crafting, extender panel stitching, multi-panel sharing, and other general mechanisms, see 03 Network Info Panel.

2. Dual Y-Axis

The EU Chart uses a dual Y-axis design to display two types of data simultaneously:

Axis Data Color Description
Left Grid Energy Blue Current wireless grid energy level
Right EU/t Rate Orange Energy change rate per tick, reflecting charge/discharge trend

Design Note: The EU/t rate line color (orange) matches the AE Chart's change-rate line color, allowing players to form consistent color recognition across different tabs.

3. 4 Time Windows

The EU Chart supports 4 time windows, each being a 61-point FIFO:

Window Sample Count Sample Interval Total Duration Description
5 minutes 61 100 ticks (5 s) 300 s Raw sampling
1 hour 61 600 ticks (30 s) 1800 s Inflow from 5m means
8 hours 61 4800 ticks (240 s) 14400 s Inflow from 1h means
24 hours 61 14400 ticks (720 s) 43200 s Inflow from 8h means

Inflow Count Chain

The 4 time windows are triggered via a nested count chain:

  • 5m → 1h: Every 12 5m samples triggers 1 1h sample
  • 1h → 8h: Every 8 1h samples triggers 1 8h sample
  • 8h → 24h: Every 3 8h samples triggers 1 24h sample

The count chain ratio is 12 → 8 → 3 (5m → 1h → 8h → 24h).

4. Brief Area Data

The brief area shows the following key data:

Data Item Calculation Description
Current Energy Real-time read Current wireless grid energy level
Average EU/t First-last delta Based on the 61-point window's first and last sample delta (300s window)
Realtime EU/t Latest 2-point slope Instantaneous change rate from the latest 2 samples
Grid Status Four-branch logic Calculating / Silent / Long-Term Silent / Normal (see 09 Grid Status Mechanism)

First-Last Delta Method: Average EU/t = (last energy - first energy) / (last tick - first tick), computed over the 61-point FIFO window. This smooths short-term fluctuations and reflects the overall trend. Uses BigDecimal precise division (6 decimals, HALF_UP) to avoid precision loss when converting BigInteger to double.

5. Spline Curve

The trend line uses the Fritsch-Carlson monotone cubic Hermite spline:

  • Algorithm: The monotoneCubicPath method implements the Fritsch-Carlson monotone cubic Hermite spline
  • Monotonicity: Preserves monotonicity, avoids overshoot
  • Endpoint handling: Natural first/last derivatives, no [0,1] hard clamp
  • Smoothing parameter: 0-12
smoothing Segments Description
0 1 segment Linear (no smoothing)
1-12 smoothing × 2 + 2 segments (4-26) Smooth curve, segments increase with smoothing

6. Display Modes

The brief area supports 3 display modes:

Mode Name Display Example
0 Normal 1,234,567
1 Scientific 1.23E6
2 Metric 1.23K

Metric mode details: Main display call points use 2 decimals (e.g. 1.23K, 999.00); axis Y tick labels keep no decimals (e.g. 1K) to avoid long labels; negative numbers uniformly use prefix minus (-1.23K). In scientific mode, small values (< 10000.0) auto-fallback to normal display.

7. Configuration

All configuration items for the EU Chart (with defaults and ranges):

Config Type / Default Range Description
trackingWindow int 0-3 Time window (0=5m / 1=1h / 2=8h / 3=24h)
trendLineSmoothing int = 2 0-12 Spline smoothing
trendLineThickness int = 3 - Trend line width (glLineWidth)
displayMode int = 0 0-2 Display mode (0=Normal / 1=Scientific / 2=Metric)
chartBorderThickness int = 3 1-8 Chart border width
chartBackgroundColor String = "" - Chart background color (empty = no fill)
screenBackgroundColor String - Screen background color (empty = no fill)
briefRatio int = 28 10-80 Brief font ratio (getBriefFontScale()=briefRatio/20.0)
showBriefEnergy boolean - Brief energy toggle
showBriefStatus boolean - Brief status toggle
showChartEnergy boolean - Chart energy curve toggle
showChartStatus boolean - Chart EU/t curve toggle
energyAxisMin / Max String - Energy Y-axis range (empty = auto, with 10% padding)
eutAxisMin / Max String - EU/t Y-axis range (empty = auto, with 10% padding)

8. Usage Guide

  1. Step 1: Craft and place the Network Info Panel in the world (see 03 Network Info Panel for crafting)
  2. Step 2: Right-click to open the GUI; the EU Chart tab (Tab 1) is shown by default
  3. Step 3: Switch between the 4 time windows (5m / 1h / 8h / 24h) in the GUI
  4. Step 4: Configure trend line smoothing, display mode, Y-axis range, colors, etc.
  5. Step 5: View the dual Y-axis chart and brief area data to observe grid energy trends and charge/discharge status

9. Color Constants

Color constants used by the EU Chart:

Element Color Value Color Description
Energy line 0x1F6FFF Blue Left-axis energy trend line
EU/t line 0xFF7A18 Orange Right-axis EU/t rate trend line
Axes 0x4E5964 Dark gray Chart axis lines
Ticks 0x6A7680 Gray Axis tick labels

Clone this wiki locally