Skip to content

Charts should show visible flat line at zero instead of empty #85

@erikdarlingdata

Description

@erikdarlingdata

Problem

When all values in a chart are 0 (e.g., no blocking events or deadlocks in the time range), the chart appears completely empty — no line, no markers, just blank space with a collapsed Y-axis. This makes it look like the chart is broken rather than showing that the signal is present but at zero.

Expected Behavior

A flat line at 0 should be visible. Zero is still a data point — it tells you the collector is running and nothing is happening, which is different from "no data."

Affected Charts

  • Locking > Trends: Blocking Events, Blocking Duration, Deadlock Count, Deadlock Wait Time
  • Likely affects other charts with the same LockChartVerticalAxis behavior when all values are 0

Root Cause

LockChartVerticalAxis calls chart.Plot.Axes.GetLimits() and locks the Y-axis to those limits. When all values are 0, the limits collapse to 0-0, making the line invisible.

Fix

When the Y range is 0 (all values equal), set a minimum Y range (e.g., 0 to 1) so the flat line is visible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions