aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/AuctionPriceScatterplot.svelte2
-rw-r--r--src/routes/auctionprices.svelte13
2 files changed, 14 insertions, 1 deletions
diff --git a/src/lib/AuctionPriceScatterplot.svelte b/src/lib/AuctionPriceScatterplot.svelte
index cfdbe9b..defadcd 100644
--- a/src/lib/AuctionPriceScatterplot.svelte
+++ b/src/lib/AuctionPriceScatterplot.svelte
@@ -75,7 +75,7 @@
bind:this={svgEl}
/>
- {#each item.auctions as auction}
+ {#each item.auctions as auction (auction.id)}
{@const [x, y] = getAuctionCoordinates(auction)}
<circle
cx={x}
diff --git a/src/routes/auctionprices.svelte b/src/routes/auctionprices.svelte
index 68ce00e..e778330 100644
--- a/src/routes/auctionprices.svelte
+++ b/src/routes/auctionprices.svelte
@@ -97,6 +97,19 @@
</b>
</p>
{/if}
+ {#if item.auctions.length >= 2}
+ <p>
+ Frequency:
+ <b>
+ {parseFloat(
+ (
+ (24 * 60 * 60) /
+ ((Date.now() / 1000 - item.auctions[0].ts) / item.auctions.length)
+ ).toPrecision(2)
+ ).toLocaleString()}/day
+ </b>
+ </p>
+ {/if}
</div>
<div class="item-scatterplot">
<AuctionPriceScatterplot {item} bind:currentlyPreviewedAuction />