Skip to content

Commit

Permalink
Chart: Add more units to the list of "when down is positive" (#2221)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Gilles authored Feb 7, 2025
1 parent 61a86db commit 3c64cf5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion front/src/components/boxs/chart/Chart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,17 @@ const intervalByName = {
'last-year': ONE_YEAR_IN_MINUTES
};

const UNITS_WHEN_DOWN_IS_POSITIVE = [DEVICE_FEATURE_UNITS.WATT_HOUR];
const UNITS_WHEN_DOWN_IS_POSITIVE = [
DEVICE_FEATURE_UNITS.WATT_HOUR,
DEVICE_FEATURE_UNITS.KILOWATT_HOUR,
DEVICE_FEATURE_UNITS.WATT,
DEVICE_FEATURE_UNITS.KILOWATT,
DEVICE_FEATURE_UNITS.AQI,
DEVICE_FEATURE_UNITS.PPM,
DEVICE_FEATURE_UNITS.PPB,
DEVICE_FEATURE_UNITS.DECIBEL,
DEVICE_FEATURE_UNITS.UV_INDEX
];

const notNullNotUndefined = value => {
return value !== undefined && value !== null;
Expand Down

0 comments on commit 3c64cf5

Please sign in to comment.