From 816e54fa12dc00f2ce03d1889eda65479adebf98 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Sun, 5 Jan 2020 13:05:39 -0500 Subject: [PATCH] use the range appropriately --- lib/philomena_web/views/stat_view.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/philomena_web/views/stat_view.ex b/lib/philomena_web/views/stat_view.ex index 7bf1d5b2..4bdd8d53 100644 --- a/lib/philomena_web/views/stat_view.ex +++ b/lib/philomena_web/views/stat_view.ex @@ -17,7 +17,7 @@ defmodule PhilomenaWeb.StatView do content_tag :svg, class: "upload-stats", viewBox: "0 0 #{graph_width} #{graph_height}" do for {datum, i} <- Enum.with_index(data) do - bar_height = safe_div(datum["doc_count"], max_docs) * graph_height + bar_height = safe_div(datum["doc_count"], max_docs - min_docs) * graph_height x = i * bar_width y = graph_height-bar_height