Sort data by date when building graphs
This doesn't affect the end result because all collections used the same order, but it makes debugging easier.
This commit is contained in:
@@ -18,7 +18,7 @@ module Ahoy
|
||||
|
||||
def build
|
||||
data = { x: [] }
|
||||
dates.each do |date|
|
||||
dates.sort.each do |date|
|
||||
# Add the key with a valid date format
|
||||
data[:x].push date.strftime("%Y-%m-%d")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user