mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-03-31 16:55:29 +02:00
Trim 0 values for upload history
This commit is contained in:
parent
8a4ced96bf
commit
2a65881f11
1 changed files with 5 additions and 1 deletions
|
@ -2,7 +2,11 @@ defmodule PhilomenaWeb.StatView do
|
||||||
use PhilomenaWeb, :view
|
use PhilomenaWeb, :view
|
||||||
|
|
||||||
def upload_graph(data) do
|
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)
|
n_buckets = length(data)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue