diff --git a/plugins/woocommerce-admin/client/components/chart/utils.js b/plugins/woocommerce-admin/client/components/chart/utils.js index a181dee6463..54c92639315 100644 --- a/plugins/woocommerce-admin/client/components/chart/utils.js +++ b/plugins/woocommerce-admin/client/components/chart/utils.js @@ -264,13 +264,10 @@ const getXTicksFromIncrementFactor = ( uniqueDates, incrementFactor ) => { ticks.push( uniqueDates[ idx ] ); } - // If the first or last date is missing from the ticks array, add it back in. + // If the first date is missing from the ticks array, add it back in. if ( ticks[ 0 ] !== uniqueDates[ 0 ] ) { ticks.unshift( uniqueDates[ 0 ] ); } - if ( ticks[ ticks.length - 1 ] !== uniqueDates[ uniqueDates.length - 1 ] ) { - ticks.push( uniqueDates[ uniqueDates.length - 1 ] ); - } return ticks; };