web: remove range from charts labels (#485)

This commit is contained in:
l5y
2025-11-21 17:05:24 +01:00
committed by GitHub
parent ac36db19a7
commit c31bb1ac74
2 changed files with 10 additions and 10 deletions
@@ -318,8 +318,8 @@ test('renderTelemetryCharts renders condensed scatter charts when telemetry exis
assert.equal(html.includes('Channel utilization (%)'), true);
assert.equal(html.includes('Air util TX (%)'), true);
assert.equal(html.includes('Utilization (%)'), true);
assert.equal(html.includes('Gas resistance (10-100k Ω)'), true);
assert.equal(html.includes('Temperature (-20-40°C)'), true);
assert.equal(html.includes('Gas resistance (\u03a9)'), true);
assert.equal(html.includes('Temperature (\u00b0C)'), true);
assert.equal(html.includes(expectedDate), true);
assert.equal(html.includes('node-detail__chart-point'), true);
});
+8 -8
View File
@@ -132,7 +132,7 @@ const TELEMETRY_CHART_SPECS = Object.freeze([
{
id: 'temperature',
position: 'left',
label: 'Temperature (-20-40°C)',
label: 'Temperature (\u00b0C)',
min: -20,
max: 40,
ticks: 4,
@@ -141,7 +141,7 @@ const TELEMETRY_CHART_SPECS = Object.freeze([
{
id: 'humidity',
position: 'left',
label: 'Humidity (0-100%)',
label: 'Humidity (%)',
min: 0,
max: 100,
ticks: 4,
@@ -151,7 +151,7 @@ const TELEMETRY_CHART_SPECS = Object.freeze([
{
id: 'pressure',
position: 'right',
label: 'Pressure (800-1100hPa)',
label: 'Pressure (hPa)',
min: 800,
max: 1_100,
ticks: 4,
@@ -160,7 +160,7 @@ const TELEMETRY_CHART_SPECS = Object.freeze([
{
id: 'gas',
position: 'rightSecondary',
label: 'Gas resistance (10-100k Ω)',
label: 'Gas resistance (\u03a9)',
min: 10,
max: 100_000,
ticks: 5,
@@ -174,7 +174,7 @@ const TELEMETRY_CHART_SPECS = Object.freeze([
axis: 'temperature',
color: '#fc8d59',
label: 'Temperature',
legend: 'Temperature (-20-40\u00b0C)',
legend: 'Temperature (\u00b0C)',
fields: ['temperature', 'temp'],
valueFormatter: value => `${value.toFixed(1)}\u00b0C`,
},
@@ -183,7 +183,7 @@ const TELEMETRY_CHART_SPECS = Object.freeze([
axis: 'humidity',
color: '#91bfdb',
label: 'Humidity',
legend: 'Humidity (0-100%)',
legend: 'Humidity (%)',
fields: ['humidity', 'relative_humidity', 'relativeHumidity'],
valueFormatter: value => `${value.toFixed(1)}%`,
},
@@ -192,7 +192,7 @@ const TELEMETRY_CHART_SPECS = Object.freeze([
axis: 'pressure',
color: '#c51b8a',
label: 'Pressure',
legend: 'Pressure (800-1100hPa)',
legend: 'Pressure (hPa)',
fields: ['pressure', 'barometric_pressure', 'barometricPressure'],
valueFormatter: value => `${value.toFixed(1)} hPa`,
},
@@ -201,7 +201,7 @@ const TELEMETRY_CHART_SPECS = Object.freeze([
axis: 'gas',
color: '#fa9fb5',
label: 'Gas resistance',
legend: 'Gas resistance (10-100k \u03a9)',
legend: 'Gas resistance (\u03a9)',
fields: ['gas_resistance', 'gasResistance'],
valueFormatter: value => formatGasResistance(value),
},