+ @if (Series.Count > 1)
+ {
+
+ }
+ @if (Series.Count > 2)
+ {
+
+ }
+
+ @if (HoveredSeries != null)
+ {
+
+
+ @(HoveredSeries.Name ?? "Series")
+
+ @foreach (var category in Categories)
+ {
+ var value = HoveredSeries.Data.ContainsKey(category) ? HoveredSeries.Data[category] : 0;
+
+ @category
+ @FormatValue(value)
+
+ }
+
+ }
+ else
+ {
+
+ Hover over a series to see details
+
+ }
+
+
+ @if (Series.Count > 1)
+ {
+
+
@LegendTitleText
+
+
+
+
+
+ }
+
+ @if (Series.Count > 2)
+ {
+
{ legendFilter = e.Value?.ToString() ?? ""; StateHasChanged(); })"
+ class="rz-textbox" style="width: 100%; font-size: 11px; padding: 2px 4px; height: 24px;" />
+ }
+
+
+ @{
+ var filteredSeries = string.IsNullOrWhiteSpace(legendFilter)
+ ? Series
+ : Series.Where(s => s.Name.Contains(legendFilter, StringComparison.OrdinalIgnoreCase)).ToList();
+ }
+ @foreach (var series in filteredSeries)
+ {
+ var isHidden = HiddenSeries.Contains(series.Name);
+ var isHovered = HoveredSeries == series;
+ var shouldShow = HoveredSeries == null || HoveredSeries == series;
+ var localSeries = series;
+
OnLegendItemMouseEnter(localSeries, isHidden))"
+ @onmouseleave="@(OnLegendItemMouseLeave)">
+
{ OnLegendCheckboxChange(localSeries, (bool)(e.Value ?? true)); })"
+ @onclick:stopPropagation="true"
+ style="cursor: pointer; margin: 0; width: 12px; height: 12px;" />
+
+
OnLegendClick(localSeries))"
+ style="flex: 1; font-size: 12px; line-height: 1.2;">@localSeries.Name
+
+ }
+
+