From b82fb69d00258cec7c56b4198fa0d0920ef7c0a5 Mon Sep 17 00:00:00 2001 From: Erik Darling <2136037+erikdarlingdata@users.noreply.github.com> Date: Wed, 18 Feb 2026 20:58:20 -0500 Subject: [PATCH] Revert Dashboard grid lines to original, add remaining Lite chart hover tooltips MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Revert Dashboard chart grid alpha back to 20 (user confirmed original looked good) - Add ChartHoverHelper to execution count, blocking trend, and deadlock trend charts in Lite — hover now shows series name, value, and timestamp Co-Authored-By: Claude Opus 4.6 --- Dashboard/Helpers/TabHelpers.cs | 2 +- Lite/Controls/ServerTab.xaml.cs | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Dashboard/Helpers/TabHelpers.cs b/Dashboard/Helpers/TabHelpers.cs index 67938549..c7556a9c 100644 --- a/Dashboard/Helpers/TabHelpers.cs +++ b/Dashboard/Helpers/TabHelpers.cs @@ -132,7 +132,7 @@ public static void ApplyDarkModeToChart(WpfPlot chart) var darkBackground = ScottPlot.Color.FromHex("#22252b"); var darkerBackground = ScottPlot.Color.FromHex("#111217"); var textColor = ScottPlot.Color.FromHex("#9DA5B4"); - var gridColor = ScottPlot.Colors.White.WithAlpha(50); + var gridColor = ScottPlot.Colors.White.WithAlpha(20); chart.Plot.FigureBackground.Color = darkBackground; chart.Plot.DataBackground.Color = darkerBackground; diff --git a/Lite/Controls/ServerTab.xaml.cs b/Lite/Controls/ServerTab.xaml.cs index 0a980681..cb0efa5b 100644 --- a/Lite/Controls/ServerTab.xaml.cs +++ b/Lite/Controls/ServerTab.xaml.cs @@ -49,6 +49,9 @@ public partial class ServerTab : UserControl private Helpers.ChartHoverHelper? _queryDurationTrendHover; private Helpers.ChartHoverHelper? _procDurationTrendHover; private Helpers.ChartHoverHelper? _queryStoreDurationTrendHover; + private Helpers.ChartHoverHelper? _executionCountTrendHover; + private Helpers.ChartHoverHelper? _blockingTrendHover; + private Helpers.ChartHoverHelper? _deadlockTrendHover; /* Column filtering */ private Popup? _filterPopup; @@ -146,6 +149,9 @@ public ServerTab(ServerConnection server, DuckDbInitializer duckDb, CredentialSe _queryDurationTrendHover = new Helpers.ChartHoverHelper(QueryDurationTrendChart, "ms/sec"); _procDurationTrendHover = new Helpers.ChartHoverHelper(ProcDurationTrendChart, "ms/sec"); _queryStoreDurationTrendHover = new Helpers.ChartHoverHelper(QueryStoreDurationTrendChart, "ms/sec"); + _executionCountTrendHover = new Helpers.ChartHoverHelper(ExecutionCountTrendChart, "/sec"); + _blockingTrendHover = new Helpers.ChartHoverHelper(BlockingTrendChart, "incidents"); + _deadlockTrendHover = new Helpers.ChartHoverHelper(DeadlockTrendChart, "deadlocks"); /* Initial load is triggered by MainWindow.ConnectToServer calling RefreshData() after collectors finish - no Loaded handler needed */ @@ -855,6 +861,7 @@ private void UpdateBlockingTrendChart(List data, int hoursBack, Date rangeStart = rangeEnd.AddHours(-hoursBack); } + _blockingTrendHover?.Clear(); if (data.Count == 0) { /* No blocking events — show a flat line at zero so the chart looks active */ @@ -904,6 +911,7 @@ private void UpdateBlockingTrendChart(List data, int hoursBack, Date plot.LegendText = "Blocking Incidents"; plot.Color = ScottPlot.Color.FromHex("#E57373"); plot.MarkerSize = 0; /* No markers, just lines */ + _blockingTrendHover?.Add(plot, "Blocking Incidents"); BlockingTrendChart.Plot.Axes.DateTimeTicksBottom(); BlockingTrendChart.Plot.Axes.SetLimitsX(rangeStart.ToOADate(), rangeEnd.ToOADate()); @@ -932,6 +940,7 @@ private void UpdateDeadlockTrendChart(List data, int hoursBack, Date rangeStart = rangeEnd.AddHours(-hoursBack); } + _deadlockTrendHover?.Clear(); if (data.Count == 0) { /* No deadlocks — show a flat line at zero so the chart looks active */ @@ -981,6 +990,7 @@ private void UpdateDeadlockTrendChart(List data, int hoursBack, Date plot.LegendText = "Deadlocks"; plot.Color = ScottPlot.Color.FromHex("#FFB74D"); plot.MarkerSize = 0; /* No markers, just lines */ + _deadlockTrendHover?.Add(plot, "Deadlocks"); DeadlockTrendChart.Plot.Axes.DateTimeTicksBottom(); DeadlockTrendChart.Plot.Axes.SetLimitsX(rangeStart.ToOADate(), rangeEnd.ToOADate()); @@ -1075,9 +1085,11 @@ private void UpdateExecutionCountTrendChart(List data) var times = data.Select(d => d.CollectionTime.AddMinutes(UtcOffsetMinutes).ToOADate()).ToArray(); var values = data.Select(d => d.Value).ToArray(); + _executionCountTrendHover?.Clear(); var plot = ExecutionCountTrendChart.Plot.Add.Scatter(times, values); plot.LegendText = "Executions"; plot.Color = ScottPlot.Color.FromHex("#BA68C8"); + _executionCountTrendHover?.Add(plot, "Executions"); ExecutionCountTrendChart.Plot.Axes.DateTimeTicksBottom(); ReapplyAxisColors(ExecutionCountTrendChart);