Skip to content

ui: temperature and heat-rise charts start their y-axis at 0 - #42

Merged
zebraengine merged 1 commit into
mainfrom
fix/charts-zero-based-y
Oct 16, 2026
Merged

zebraengine merged 1 commit into
mainfrom
fix/charts-zero-based-y

Conversation

@zebraengine

Copy link
Copy Markdown
Owner

Problem

The heat-rise and temperature charts scaled their y-axis to the data, so they started around 20 C. The power, current and relay charts already started at 0.

Code touched

wallmonitor/static/app.js only:

  • scatterChart gains the zeroBase option lineChart already has: the y range is extended down to 0, nothing else changes.
  • zeroBase: true on four charts:
    • Alerts page: "Handle heat rise per charging segment"
    • Alerts page: "Heat rise vs ambient" (y axis only; the ambient x axis still fits the data)
    • Session detail: "Temperatures"
    • Live: "Derate forecast — live"
  • Left on auto-scale: Wi-Fi RSSI (negative dBm, so 0 is the top of its range) and SNR. Phase voltages and pilot already reach 0 in the data.

Risk

  • Display only; no API or data change.
  • Small changes take less of the chart's height. The heat-rise chart exists to catch a climb of a few degrees: on a 0-50 C axis a 3 C step is about 6% of the plot instead of about 15%. The drift verdict under the chart is unaffected.

Verification

  • uv run pytest: 179 passed; node --check on app.js.
  • Served this branch against a scratch copy of the production database (snapshot 2026-10-14) and read the rendered axes in Chrome:
    • heat rise per segment: 0, 10, 20, 30, 40, 50
    • heat rise vs ambient: 0 to 50 on y
    • session 101 Temperatures: 0, 25, 50, 75, 100
    • The live derate forecast only renders while charging, so it was checked by code reading only. It takes the same lineChart option as the other three.

Deploy: git pull on the mini-PC; static files are served with Cache-Control: no-cache, so no restart is needed.

🤖 Generated with Claude Code

The heat-rise chart, the heat-rise-vs-ambient scatter, the session
Temperatures chart and the live derate forecast scaled their y-axis to the
data, so they started around 20 C. They now start at 0, like the power,
current and relay charts already did. scatterChart gains the same zeroBase
option lineChart has.

Left on auto-scale: Wi-Fi RSSI (negative dBm) and SNR. Phase voltages and
pilot already reach 0 in the data.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@zebraengine
zebraengine merged commit a7db8e0 into main Oct 16, 2026
1 check passed
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.

1 participant