diff --git a/packages/bump/package.json b/packages/bump/package.json index a529a26e58..fb13dda347 100644 --- a/packages/bump/package.json +++ b/packages/bump/package.json @@ -29,7 +29,6 @@ "@nivo/legends": "0.62.0", "@nivo/tooltip": "0.62.0", "d3-shape": "^1.3.5", - "lodash": "^4.17.11", "react-spring": "^8.0.27" }, "peerDependencies": { diff --git a/packages/bump/src/area-bump/compute.js b/packages/bump/src/area-bump/compute.js index 40fb02cfd7..01b7750998 100644 --- a/packages/bump/src/area-bump/compute.js +++ b/packages/bump/src/area-bump/compute.js @@ -6,7 +6,6 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ -import sortBy from 'lodash/sortBy' import { scalePoint, scaleLinear } from 'd3-scale' export const computeSeries = ({ data, width, height, align, spacing, xPadding }) => { @@ -61,8 +60,8 @@ export const computeSeries = ({ data, width, height, align, spacing, xPadding }) offset = height - sliceHeight } - sortBy(Array.from(slice.values.values()), 'value') - .reverse() + Array.from(slice.values.values()) + .sort((a, b) => b.value - a.value) .forEach((value, position, all) => { const previousValues = all.filter((i, pos) => pos < position) const beforeValue = previousValues.reduce((t, v) => t + v.value, 0)