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