From 70a4d32a6560799423bd1f4f623a672f7ef08eb6 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sat, 17 Jan 2026 17:07:54 -0600 Subject: [PATCH] Flip inbound/outbound traffic vertically on device chart Changed inbound to positive values (top) and outbound to negative values (bottom) --- lib/towerops_web/live/device_live/show.ex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/towerops_web/live/device_live/show.ex b/lib/towerops_web/live/device_live/show.ex index 72caaf85..893de4bb 100644 --- a/lib/towerops_web/live/device_live/show.ex +++ b/lib/towerops_web/live/device_live/show.ex @@ -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