Class GlobalAutoScaler
Global auto-range scaler with hysteresis (expand fast, contract slow).
Ideal when the signal range is unknown or drifting.
Handles grid resize gracefully — optionally preserves or resets range.
Inheritance
GlobalAutoScaler
Assembly: MOSAIC.dll
Syntax
public sealed class GlobalAutoScaler : IHeatmapScaler
Constructors
GlobalAutoScaler(double, double, double, bool)
Declaration
public GlobalAutoScaler(double expandAlpha = 0.6, double contractAlpha = 0.08, double minSpan = 1E-09, bool resetOnReconfigure = true)
Parameters
| Type |
Name |
Description |
| double |
expandAlpha |
Weight when range expands (0..1). Higher = faster tracking.
|
| double |
contractAlpha |
Weight when range contracts (0..1). Lower = steadier baseline.
|
| double |
minSpan |
Minimum span to avoid numeric collapse.
|
| bool |
resetOnReconfigure |
If true, resets range on Configure(). If false, preserves range across grid changes.
|
Fields
_contractA
Declaration
private readonly double _contractA
Field Value
_expandA
Declaration
private readonly double _expandA
Field Value
_gMax
Declaration
Field Value
_gMin
Declaration
Field Value
_minSpan
Declaration
private readonly double _minSpan
Field Value
Declaration
private readonly bool _resetOnReconfigure
Field Value
Methods
Called whenever the grid size changes (length = rows*cols).
Implementations must handle any cell count gracefully — never throw.
Declaration
public void Configure(int cellCount)
Parameters
| Type |
Name |
Description |
| int |
cellCount |
|
Declaration
private static string FormatValue(double v)
Parameters
| Type |
Name |
Description |
| double |
v |
|
Returns
MapFrame(ReadOnlySpan<double>, WeightedPoint[], int[]?, Func<double, double>?, out LegendInfo)
Map an input frame to weights in LiveChartsCore.Defaults.WeightedPoint.Weight.
Declaration
public void MapFrame(ReadOnlySpan<double> frame, WeightedPoint[] points, int[]? indexMap, Func<double, double>? valueTransform, out LegendInfo legend)
Parameters
Implements