-
Notifications
You must be signed in to change notification settings - Fork 0
Faceting #259 #272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Faceting #259 #272
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
131e7d1
Add faceting story to each plot
chowington 22f52fd
Create FacetedBarplot component
chowington b73ea05
Merge branch 'individual-facetedplot-components' into faceting-#259
chowington 9f8d027
Nonfunctional FacetedBarplot using FacetedPlot
chowington 5d00b2a
Add basic functionality to expand faceted plot to modal
chowington 46f6fcd
Faceted plot modal cleanup
chowington 2de15e7
Uncomment FacetedBarplot which now mysteriously works
chowington 6b545d0
Improve faceting modal close button
chowington d2291de
Better modal plot style in story
chowington 280d244
Change order of props
chowington 74cea42
Add unique FacetedXPlot component for each plot
chowington 672b2cc
Fix faceting plot titles bug
chowington 3d092eb
Fix pointer cursor bug
chowington 3575d2b
Fix faceted pie plot click bug
chowington 48483ba
Move pie plot onPlotlyRender call to FacetedPiePlot
chowington 282e695
Add comment
chowington 51185dd
Change a couple of default faceted plot styles
chowington fc75038
Export default faceted plot styles
chowington ac3926d
Make FacetedPlotPropsWithRef
chowington fa38b76
Add button title
chowington b1a7774
Increase pixels per character in mosaic plot
chowington eca0bbc
Reorder component props
chowington 795102b
Update faceted plot default styles
chowington File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,42 @@ | ||
import Barplot, { BarplotProps } from '../Barplot'; | ||
import FacetedPlot, { FacetedPlotPropsWithRef } from '../FacetedPlot'; | ||
import { BarplotData } from '../../types/plots'; | ||
|
||
export const defaultContainerStyles: BarplotProps['containerStyles'] = { | ||
height: 300, | ||
width: 375, | ||
marginLeft: '0.75rem', | ||
border: '1px solid #dedede', | ||
boxShadow: '1px 1px 4px #00000066', | ||
}; | ||
|
||
export const defaultSpacingOptions: BarplotProps['spacingOptions'] = { | ||
marginRight: 10, | ||
marginLeft: 10, | ||
marginBottom: 10, | ||
marginTop: 50, | ||
}; | ||
|
||
type FacetedBarplotProps = Omit< | ||
FacetedPlotPropsWithRef<BarplotData, BarplotProps>, | ||
'component' | ||
>; | ||
|
||
const FacetedBarplot = (facetedBarplotProps: FacetedBarplotProps) => { | ||
const { componentProps } = facetedBarplotProps; | ||
|
||
return ( | ||
<FacetedPlot | ||
component={Barplot} | ||
{...facetedBarplotProps} | ||
componentProps={{ | ||
...componentProps, | ||
containerStyles: | ||
componentProps.containerStyles ?? defaultContainerStyles, | ||
spacingOptions: componentProps.spacingOptions ?? defaultSpacingOptions, | ||
}} | ||
/> | ||
); | ||
}; | ||
|
||
export default FacetedBarplot; |
This file contains hidden or 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,43 @@ | ||
import Boxplot, { BoxplotProps } from '../Boxplot'; | ||
import FacetedPlot, { FacetedPlotPropsWithRef } from '../FacetedPlot'; | ||
import { BoxplotData } from '../../types/plots'; | ||
|
||
export const defaultContainerStyles: BoxplotProps['containerStyles'] = { | ||
height: 300, | ||
width: 375, | ||
marginLeft: '0.75rem', | ||
marginBottom: '0.25rem', | ||
border: '1px solid #dedede', | ||
boxShadow: '1px 1px 4px #00000066', | ||
}; | ||
|
||
export const defaultSpacingOptions: BoxplotProps['spacingOptions'] = { | ||
marginRight: 15, | ||
marginLeft: 15, | ||
marginBottom: 10, | ||
marginTop: 50, | ||
}; | ||
|
||
type FacetedBoxplotProps = Omit< | ||
FacetedPlotPropsWithRef<BoxplotData, BoxplotProps>, | ||
'component' | ||
>; | ||
|
||
const FacetedBoxplot = (facetedBoxplotProps: FacetedBoxplotProps) => { | ||
const { componentProps } = facetedBoxplotProps; | ||
|
||
return ( | ||
<FacetedPlot | ||
component={Boxplot} | ||
{...facetedBoxplotProps} | ||
componentProps={{ | ||
...componentProps, | ||
containerStyles: | ||
componentProps.containerStyles ?? defaultContainerStyles, | ||
spacingOptions: componentProps.spacingOptions ?? defaultSpacingOptions, | ||
}} | ||
/> | ||
); | ||
}; | ||
|
||
export default FacetedBoxplot; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍