Trim 0 values for upload history

This commit is contained in:
Chaska 2024-05-19 21:09:19 -05:00
parent 8a4ced96bf
commit 2a65881f11

View file

@ -2,7 +2,11 @@ defmodule PhilomenaWeb.StatView do
use PhilomenaWeb, :view
def upload_graph(data) do
data = Enum.sort_by(data, & &1["key"])
data =
data
|> Enum.sort_by(& &1["key"])
|> Enum.filter(fn x -> x["doc_count"] > 0 end)
n_buckets = length(data)
{