From 22951c2b8deb52d243dee6db04f99734c279b0b2 Mon Sep 17 00:00:00 2001 From: Eliad Moosavi Date: Wed, 24 Jun 2020 17:18:04 -0400 Subject: [PATCH] Update packages/core/src/model.ts Co-authored-by: Donisius Wigie <45505172+Donisius@users.noreply.github.com> --- packages/core/src/model.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/core/src/model.ts b/packages/core/src/model.ts index 83be4b0b09..3148ee91c1 100644 --- a/packages/core/src/model.ts +++ b/packages/core/src/model.ts @@ -169,11 +169,7 @@ export class ChartModel { // Sort keys if (scaleType === ScaleTypes.TIME) { - stackKeys.sort((a, b) => { - const dateA: any = new Date(a); - const dateB: any = new Date(b); - return dateA - dateB; - }) + stackKeys.sort((a, b) => new Date(a) - new Date(b)); } else if ( scaleType === ScaleTypes.LOG || scaleType === ScaleTypes.LINEAR