Skip to content

Commit

Permalink
fix: bin count result not match (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
k6sdevbob authored Jul 26, 2023
1 parent 39d831f commit 8d4f3d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/graphic-walker/src/lib/execExp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function binCount(resKey: string, params: IExpParamter[], data: IDataFrame, binS

const groupSize = valueWithIndices.length / binSize;

const newValues = valueWithIndices.map(item => {
const newValues = valueWithIndices.sort((a, b) => a.index - b.index).map(item => {
let bIndex = Math.floor(item.orderIndex / groupSize);
if (bIndex === binSize) bIndex = binSize - 1;
return bIndex + 1
Expand Down

1 comment on commit 8d4f3d8

@vercel
Copy link

@vercel vercel bot commented on 8d4f3d8 Jul 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.