add period comparison deltas to analytics stat cards
All checks were successful
deploy / deploy (push) Successful in 1m21s
All checks were successful
deploy / deploy (push) Successful in 1m21s
Each stat card now shows the percentage change vs the equivalent previous period (e.g. 30d compares last 30 days vs 30 days before). Handles zero-baseline with "new" label and caps extreme deltas at >999%. Seed data extended to 2 years for meaningful 12m comparisons. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -62,7 +62,7 @@ defmodule BerrypodWeb.Admin.AnalyticsTest do
|
||||
|
||||
{:ok, view, _html} = live(conn, ~p"/admin/analytics")
|
||||
|
||||
assert has_element?(view, "rect")
|
||||
assert has_element?(view, "[data-bars]")
|
||||
end
|
||||
|
||||
test "changes period", %{conn: conn} do
|
||||
|
||||
Reference in New Issue
Block a user