Change Voltage chart to use suggested min/max (#1)

The Voltage/Current chart often either shows lines with so little variation that you cannot see changes, or the values go off the top/bottom.

This change allows the chart to adapt dynamically to the values being returned.
This commit is contained in:
sgtwilko 2025-02-26 13:06:57 +00:00 committed by Anton Roslund
parent d95af37be5
commit 17be3cb6a9

View file

@ -2309,14 +2309,14 @@
}, },
y: { y: {
min: 0, min: 0,
max: 30, suggestedMax: 6,
ticks: { ticks: {
callback: (label) => `${label}V`, callback: (label) => `${label}V`,
}, },
}, },
y1: { y1: {
min: -500, suggestedMin: -50,
max: 500, suggestedMax: 50,
ticks: { ticks: {
stepSize: 50, stepSize: 50,
callback: (label) => `${label}mA`, callback: (label) => `${label}mA`,