Components\Controls\Chart\MetricTable.razor.cs (11)
157var percentiles = new SortedDictionary<int, (string Name, double? Value, ValueDirectionChange Direction)>();
268private static ValueDirectionChange GetDirectionChange(double? comparisonResult)
272return ValueDirectionChange.Up;
275return comparisonResult < 0 ? ValueDirectionChange.Down : ValueDirectionChange.Constant;
297public required ValueDirectionChange? ValueChange { get; init; }
302public required SortedDictionary<int, (string Name, double? Value, ValueDirectionChange Direction)> Percentiles { get; init; }
312private (Icon Icon, string Title)? GetIconAndTitleForDirection(ValueDirectionChange? directionChange)
316ValueDirectionChange.Up => (new Icons.Filled.Size16.ArrowCircleUp().WithColor(Color.Success), Loc[nameof(ControlsStrings.MetricTableValueIncreased)]),
317ValueDirectionChange.Down => (new Icons.Filled.Size16.ArrowCircleDown().WithColor(Color.Warning), Loc[nameof(ControlsStrings.MetricTableValueDecreased)]),
318ValueDirectionChange.Constant => (new Icons.Filled.Size16.ArrowCircleRight().WithColor(Color.Info), Loc[nameof(ControlsStrings.MetricTableValueNoChange)]),