diff --git a/assets/js/app.ts b/assets/js/app.ts index 066bc644..3c4bc0f8 100644 --- a/assets/js/app.ts +++ b/assets/js/app.ts @@ -220,7 +220,7 @@ const SensorChart: SensorChartHook = { if (unit === '') { return Math.round(value) } - return value + ' ' + unit + return value.toFixed(1) + ' ' + unit } }, grid: { @@ -253,7 +253,7 @@ const SensorChart: SensorChartHook = { if (unit === '') { return Math.round(value) } - return value + unit + return value.toFixed(1) + ' ' + unit } }, grid: { diff --git a/lib/towerops_web/live/graph_live/show.ex b/lib/towerops_web/live/graph_live/show.ex index ca24d828..cf55bc81 100644 --- a/lib/towerops_web/live/graph_live/show.ex +++ b/lib/towerops_web/live/graph_live/show.ex @@ -766,7 +766,7 @@ defmodule ToweropsWeb.GraphLive.Show do end defp format_value(value, unit) when is_integer(value) do - "#{value} #{unit}" + "#{Float.round(value / 1, 1)} #{unit}" end # Live polling functions