Skip to content

Some graphs don't get dark mode until they get data#322

Merged
erikdarlingdata merged 1 commit into
erikdarlingdata:devfrom
ClaudioESSilva:fix/MissingDarkModeCharts-issue-321
Feb 26, 2026
Merged

Some graphs don't get dark mode until they get data#322
erikdarlingdata merged 1 commit into
erikdarlingdata:devfrom
ClaudioESSilva:fix/MissingDarkModeCharts-issue-321

Conversation

@ClaudioESSilva
Copy link
Copy Markdown
Contributor

@ClaudioESSilva ClaudioESSilva commented Feb 26, 2026

What does this PR do?

Fixes #321

Which component(s) does this affect?

  • Full Dashboard
  • Lite Dashboard
  • Lite Tests
  • SQL collection scripts
  • CLI Installer
  • GUI Installer
  • Documentation

How was this tested?

Opened the tabs and checked they were in dark mode instead of light mode

Changes

  • ResourceMetricsContent.xaml.cs — all 15 charts now have dark theme applied in the constructor
  • MemoryContent.xaml.cs — all 6 charts now have dark theme applied in the constructor

Charts will show the dark background immediately when the tabs are opened, instead of flashing white while waiting for data to load. The existing ApplyDarkModeToChart calls inside the load methods are still needed because chart.Plot.Clear() resets all styling — they correctly reapply the theme after clearing.

The Lite project had the same issue. ServerTab.xaml.cs has 23 charts, all of which only had ApplyDarkTheme() called inside data-loading methods. Added upfront calls to the constructor.

Checklist

  • I have read the contributing guide
  • My code builds with zero warnings (dotnet build -c Debug)
  • I have tested my changes against at least one SQL Server version
  • I have not introduced any hardcoded credentials or server names

Copy link
Copy Markdown
Owner

@erikdarlingdata erikdarlingdata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All 44 charts across the 3 files are covered — verified against the XAML declarations. Clean fix.

I'll add a follow-up commit for 2 charts in SystemEventsContent.xaml (MemoryBrokerChart, MemoryBrokerRatioChart) that have the same issue.

@erikdarlingdata erikdarlingdata merged commit e9fc868 into erikdarlingdata:dev Feb 26, 2026
4 checks passed
erikdarlingdata added a commit that referenced this pull request Feb 26, 2026
Follow-up to PR #322 — SystemEventsContent had the same issue where
charts flash white until data loads. Adds upfront ApplyDarkModeToChart
calls for all 19 charts in the constructor.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants