Skip to content

Chart lines connect across collection gaps, drawing data that was never collected - break the line when the gap exceeds the series' cadence #1944

Closed

Description

@erikdarlingdata

From discussion #1936 (@markallisongit): when the monitor is offline or a collector is not running, chart lines connect straight across the gap, which reads as real data where none exists. His screenshot shows a continuous line across a known offline window; Redgate Monitor renders a gap there, and he is right that ours is misleading.

Verified before filing: the chart stack is ScottPlot renderers in the shared PerformanceMonitor.Ui, and NO gap handling exists anywhere - no NaN insertion, no threshold logic, in either app. Every series connects consecutive points unconditionally.

Fix shape: in the shared render helpers, break the line where the delta between consecutive points exceeds a threshold derived from the series' own cadence (roughly 3x the median inter-point interval, so normal jitter and slow collectors do not shatter the line) by inserting a NaN point - ScottPlot renders NaN as a line break. Shared Ui means both apps get it at once, chart-wide. The threshold must derive from the observed cadence rather than a constant, because collectors run at different frequencies (1-minute counters vs daily index stats) and one number cannot serve both.

Honest-rendering family: same principle as the state-only em dash (#1846) and the partial-window notices - the chart must not claim knowledge it does not have.

Activity

  1. added a commit that references this issue on Jul 31, 2026
  2. erikdarlingdata commented on Jul 31, 2026

    @erikdarlingdata
    OwnerAuthor

    Shipped in #1947, from markallisongit's discussion #1936: every time-series line in both apps now breaks where a gap exceeds three times that series' own median spacing, so an offline window renders as absence instead of a line claiming data that was never collected. The threshold derives per series because collectors run at wildly different cadences, and the median rather than the mean so the outage gaps being detected cannot inflate the yardstick detecting them. The review round caught three things the mechanism's unit tests could not see and all were taken: synthetic spike-baseline arrays keep plain rendering (their artificial deltas are not a cadence), the gradient fill now survives a gap (Enumerable.Min/Max propagate NaN, so one gap marker silently killed a series' whole fill), and CSV exports skip the fabricated mid-gap markers so exported data stays strictly what was collected.

  3. added a commit that references this issue on Aug 3, 2026
    afe79b3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions