BAR_RANGE_EXCLUDES_ZERO
BAR_RANGE_EXCLUDES_ZERO is a lint warning: an XY chart with bar series has an authored y-axis range that excludes zero, so bar lengths are not proportional to their values.
What triggers it. A y-axis min --> max range entirely above or below zero. Bars grow from zero clamped into the range, so every bar starts at the reported baseline and small differences look large.
How to fix it. Include zero in the range with set_y_axis, or draw the series as a line, whose position (not length) carries the value.
Minimal reproducer
This source triggers BAR_RANGE_EXCLUDES_ZERO — checked at build time against the same engine the editor runs.
xychart-beta
x-axis [Q1, Q2, Q3]
y-axis 90 --> 100
bar [92, 95, 97]
Open this reproducer in the editor
Run am verify diagram.mmd --json, inspect this code, and apply the smallest source or typed mutation that clears it. If it persists after two mechanical attempts, return the warning and ask for human review.
In the cloned repo, am is bun run bin/am.ts.
Machine-readable: this page as Markdown.
Back to all warning codes, or open a blank editor to try a fix.