Components\Controls\Chart\MetricTable.razor.cs (12)
166var percentiles = new SortedDictionary<int, (string Name, double? Value, ValueDirectionChange? Direction)>();
170ValueDirectionChange? direction = trace.Values[i] is not null ? GetDirectionChange(valueDiffs[traceIndex]) : null;
277private static ValueDirectionChange GetDirectionChange(double? comparisonResult)
281return ValueDirectionChange.Up;
284return comparisonResult < 0 ? ValueDirectionChange.Down : ValueDirectionChange.Constant;
306public required ValueDirectionChange? ValueChange { get; init; }
311public required SortedDictionary<int, (string Name, double? Value, ValueDirectionChange? Direction)> Percentiles { get; init; }
314private (Icon Icon, string Title)? GetIconAndTitleForDirection(ValueDirectionChange? directionChange)
318ValueDirectionChange.Up => (new Icons.Filled.Size16.ArrowCircleUp().WithColor(Color.Success), Loc[nameof(ControlsStrings.MetricTableValueIncreased)]),
319ValueDirectionChange.Down => (new Icons.Filled.Size16.ArrowCircleDown().WithColor(Color.Warning), Loc[nameof(ControlsStrings.MetricTableValueDecreased)]),
320ValueDirectionChange.Constant => (new Icons.Filled.Size16.ArrowCircleRight().WithColor(Color.Info), Loc[nameof(ControlsStrings.MetricTableValueNoChange)]),