@using TaskTrackingSystem.WebApp.Components.Shared.Charts
@if (!Items.Any()) {
@EmptyText
} else { @foreach (var item in Items) { var width = Math.Clamp(item.Value, 0, MaxValue) / MaxValue * 100;
@if (!string.IsNullOrWhiteSpace(item.LeadingText)) {
@item.LeadingText
}
@item.Label
@item.ValueLabel
@if (!string.IsNullOrWhiteSpace(item.Detail)) {
@item.Detail
}
} }
@code { [Parameter] public IReadOnlyList Items { get; set; } = Array.Empty(); [Parameter] public double MaxValue { get; set; } = 100; [Parameter] public string EmptyText { get; set; } = "No data available."; [Parameter] public string WrapperClass { get; set; } = "space-y-4"; }