Components\Controls\Chart\MetricTable.razor.cs (11)
159var percentiles = new SortedDictionary<int, (string Name, double? Value, ValueDirectionChange Direction)>();
263private static ValueDirectionChange GetDirectionChange(double? comparisonResult)
267return ValueDirectionChange.Up;
270return comparisonResult < 0 ? ValueDirectionChange.Down : ValueDirectionChange.Constant;
292public required ValueDirectionChange? ValueChange { get; init; }
297public required SortedDictionary<int, (string Name, double? Value, ValueDirectionChange Direction)> Percentiles { get; init; }
300private (Icon Icon, string Title)? GetIconAndTitleForDirection(ValueDirectionChange? directionChange)
304ValueDirectionChange.Up => (new Icons.Filled.Size16.ArrowCircleUp().WithColor(Color.Success), Loc[nameof(ControlsStrings.MetricTableValueIncreased)]),
305ValueDirectionChange.Down => (new Icons.Filled.Size16.ArrowCircleDown().WithColor(Color.Warning), Loc[nameof(ControlsStrings.MetricTableValueDecreased)]),
306ValueDirectionChange.Constant => (new Icons.Filled.Size16.ArrowCircleRight().WithColor(Color.Info), Loc[nameof(ControlsStrings.MetricTableValueNoChange)]),