Skip to content

Commit

Permalink
front: fix slopes and curves wrong display
Browse files Browse the repository at this point in the history
Add an extra point on the chart to match an histogram form
  • Loading branch information
SharglutDev authored and kmer2016 committed Jul 8, 2024
1 parent 36dd06a commit 98550cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ export const getExpectedResultDataNumber = <T extends 'gradient' | 'radius'>(
[
{ position: 0, [value]: 0 },
{ position: 1, [value]: 1 },
{ position: 1, [value]: 2 },
{ position: 2, [value]: 2 },
{ position: 2, [value]: 3 },
{ position: 3, [value]: 3 },
{ position: 3, [value]: 4 },
{ position: 4, [value]: 4 },
] as PositionData<T>[];

Expand Down
6 changes: 5 additions & 1 deletion front/src/applications/operationalStudies/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ export const transformBoundariesDataToPositionDataArray = <T extends 'gradient'
position: mmToM(boundary),
[value]: boundariesData.values[index],
} as PositionData<T>;
acc.push(newData);
const combiningData = {
position: mmToM(boundary),
[value]: boundariesData.values[index + 1],
} as PositionData<T>;
acc.push(newData, combiningData);
return acc;
},
[{ position: 0, [value]: 0 }] as PositionData<T>[]
Expand Down

0 comments on commit 98550cb

Please sign in to comment.