mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 22:27:59 +01:00
use the range appropriately
This commit is contained in:
parent
af97bd1717
commit
816e54fa12
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ defmodule PhilomenaWeb.StatView do
|
||||||
|
|
||||||
content_tag :svg, class: "upload-stats", viewBox: "0 0 #{graph_width} #{graph_height}" do
|
content_tag :svg, class: "upload-stats", viewBox: "0 0 #{graph_width} #{graph_height}" do
|
||||||
for {datum, i} <- Enum.with_index(data) 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
|
x = i * bar_width
|
||||||
y = graph_height-bar_height
|
y = graph_height-bar_height
|
||||||
|
|
Loading…
Reference in a new issue