From 4bda39522e96d0a08bd8b0be098544604f15f44e Mon Sep 17 00:00:00 2001 From: rferraton <16419423+rferraton@users.noreply.github.com> Date: Sat, 28 Mar 2026 18:25:14 +0100 Subject: [PATCH 1/2] - Create FormatWaitRatio helper method in WaitStatsModels.cs - Modify WaitStatsProfileControl to default to ribbon chart mode - Remove the grid data button from WaitStatsProfileControl header - Add legend button to WaitStatsProfileControl that opens a color legend popup - Add vertical dashed lines for day boundaries in WaitStatsRibbonControl - Align X-axis ticks/labels to day boundaries (00:00) in WaitStatsRibbonControl - Add horizontal dashed average line with label in WaitStatsRibbonControl - Apply FormatWaitRatio in WaitStatsRibbonControl tooltips - Apply FormatWaitRatio in WaitProfileBarControl tooltips - Apply FormatWaitRatio in WaitStatsProfileControl grid table rows --- .../Controls/WaitProfileBarControl.axaml.cs | 2 +- .../Controls/WaitStatsProfileControl.axaml | 33 +--- .../Controls/WaitStatsProfileControl.axaml.cs | 147 ++++++++++++------ .../Controls/WaitStatsRibbonControl.axaml.cs | 117 ++++++++++++-- src/PlanViewer.Core/Models/WaitStatsModels.cs | 27 ++++ 5 files changed, 238 insertions(+), 88 deletions(-) diff --git a/src/PlanViewer.App/Controls/WaitProfileBarControl.axaml.cs b/src/PlanViewer.App/Controls/WaitProfileBarControl.axaml.cs index 61cfb81..9de88d0 100644 --- a/src/PlanViewer.App/Controls/WaitProfileBarControl.axaml.cs +++ b/src/PlanViewer.App/Controls/WaitProfileBarControl.axaml.cs @@ -113,7 +113,7 @@ private void Redraw() Canvas.SetTop(rect, 0); BarCanvas.Children.Add(rect); - ToolTip.SetTip(rect, $"{seg.Category}: {seg.WaitRatio:P2} ({seg.Ratio:P1} of total)"); + ToolTip.SetTip(rect, $"{seg.Category}: {WaitRatioFormatter.Format(seg.WaitRatio)} ({seg.Ratio:P1} of total)"); var capturedCategory = seg.Category; rect.PointerPressed += (_, e) => diff --git a/src/PlanViewer.App/Controls/WaitStatsProfileControl.axaml b/src/PlanViewer.App/Controls/WaitStatsProfileControl.axaml index 66bd23b..9b83576 100644 --- a/src/PlanViewer.App/Controls/WaitStatsProfileControl.axaml +++ b/src/PlanViewer.App/Controls/WaitStatsProfileControl.axaml @@ -1,11 +1,11 @@ -