-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(attritionTableHistogramModal): updated stories to show euler dia…
…grams
- Loading branch information
1 parent
b32dbf1
commit 8b676b7
Showing
8 changed files
with
103 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
export const generateHistogramTestData = () => { | ||
const minNumberOfBars = 5; | ||
const maxNumberOfBars = 15; | ||
const minPersonCount = 100; | ||
const maxPersonCount = 2000; | ||
const binSizeOffSet = 10; | ||
const numberOfBars = | ||
Math.floor(Math.random() * maxNumberOfBars) + minNumberOfBars; | ||
// Create an array of numberOfBars objects | ||
const objectsArray = Array.from({ length: numberOfBars }, (v, i) => { | ||
const start = i * binSizeOffSet; | ||
return { | ||
start: start, | ||
end: start + binSizeOffSet, | ||
personCount: | ||
Math.floor(Math.random() * (maxPersonCount - minPersonCount)) + | ||
minPersonCount, | ||
}; | ||
}); | ||
return objectsArray; | ||
}; | ||
|
||
export const generateEulerTestData = () => ({ | ||
cohort_overlap: { | ||
case_control_overlap: Math.floor(Math.random() * 5000), | ||
}, // because of random here, we get some data that does not really make sense...SuccessCase2 tries to fix that for some of the relevant group overlaps... | ||
}); |