From f8f1a5ccedbe5d67a8b635dc2041ace78cd50781 Mon Sep 17 00:00:00 2001 From: Dean Lofts Date: Sun, 15 Sep 2024 00:05:52 +1000 Subject: [PATCH] fix analytics charts --- app/views/analytics/index.html.erb | 40 ++++++++++++++++-------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/app/views/analytics/index.html.erb b/app/views/analytics/index.html.erb index b5f1a2b..12f7e22 100644 --- a/app/views/analytics/index.html.erb +++ b/app/views/analytics/index.html.erb @@ -100,30 +100,32 @@ - -
-

Top Visitor Locations

-
- - - - - - - - - - <% @location_data.each_with_index do |location, index| %> + +
+

Top Visitor Locations

+
+
CityCountryViews
+ + + + + + + + + <% @location_data.each_with_index do |location, index| %> + <% unless location[:city] == 'Unknown' && location[:country] == 'Unknown' %> - - + + <% end %> - -
CityCountryViews
<%= location[:city] || 'Unknown' %><%= location[:country] || 'Unknown' %><%= location[:city].present? && location[:city] != 'Unknown' ? location[:city] : '' %><%= location[:country].present? && location[:country] != 'Unknown' ? location[:country] : '' %> <%= number_with_delimiter(location[:count]) %>
-
+ <% end %> + +
+