aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/AuctionPriceScatterplot.svelte5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/AuctionPriceScatterplot.svelte b/src/lib/AuctionPriceScatterplot.svelte
index d8946fe..da1aed2 100644
--- a/src/lib/AuctionPriceScatterplot.svelte
+++ b/src/lib/AuctionPriceScatterplot.svelte
@@ -15,7 +15,10 @@
const gridWidth = 100 / hoursBetween
// this code is bad but it works
- let heightCoinInterval = Math.ceil(Math.pow(10, Math.floor(Math.log10(maxCoins / 5))))
+ let heightCoinInterval = Math.max(
+ 1,
+ Math.ceil(Math.pow(10, Math.floor(Math.log10(maxCoins / 5))))
+ )
if (heightCoinInterval < maxCoins / 20) {
heightCoinInterval *= 5
} else if (heightCoinInterval < maxCoins / 10) {