From 0e6e456df1dbc4a93e82395e2e4d46d8df23881f Mon Sep 17 00:00:00 2001 From: Made Baruna Date: Wed, 7 Apr 2021 16:23:12 +0800 Subject: [PATCH] Fix #28 monthly graph not ordered --- src/routes/wish/_monthlyGraph.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/wish/_monthlyGraph.svelte b/src/routes/wish/_monthlyGraph.svelte index c015be59..46a049c2 100644 --- a/src/routes/wish/_monthlyGraph.svelte +++ b/src/routes/wish/_monthlyGraph.svelte @@ -15,7 +15,7 @@ const legendary = []; const rare = []; - const entries = Object.entries(data); + const entries = Object.entries(data).sort((a, b) => a[0].localeCompare(b[0])); for (let [time, value] of entries) { labels.push(time); total.push(value.total);