Flip inbound/outbound traffic vertically on device chart

Changed inbound to positive values (top) and outbound to negative values (bottom)
This commit is contained in:
Graham McIntire 2026-01-17 17:07:54 -06:00
parent 80a688995a
commit 70a4d32a65
No known key found for this signature in database

View file

@ -398,8 +398,8 @@ defmodule ToweropsWeb.DeviceLive.Show do
out_data = calculate_bps_data(all_stats, :outbound)
datasets = [
%{label: "Inbound", data: in_data},
%{label: "Outbound", data: out_data}
%{label: "Outbound", data: out_data},
%{label: "Inbound", data: in_data}
]
Jason.encode!(%{datasets: datasets})
@ -414,7 +414,7 @@ defmodule ToweropsWeb.DeviceLive.Show do
%{
x: DateTime.to_unix(t2, :millisecond),
y: -bps
y: bps
}
end)
end
@ -428,7 +428,7 @@ defmodule ToweropsWeb.DeviceLive.Show do
%{
x: DateTime.to_unix(t2, :millisecond),
y: bps
y: -bps
}
end)
end