-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add outliers table vis type + layout (DHIS2-16344)
- Loading branch information
Showing
8 changed files
with
98 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import PropTypes from 'prop-types' | ||
import React from 'react' | ||
|
||
const OutliersTableIcon = ({ | ||
style = { paddingRight: '8px', width: 24, height: 24 }, | ||
}) => ( | ||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0,0,48,48" style={style}> | ||
<g fill="none" fillRule="evenodd"> | ||
<polygon points="0 0 48 0 48 48 0 48" /> | ||
<rect | ||
width="34" | ||
height="26" | ||
x="7" | ||
y="11" | ||
stroke="#4A5768" | ||
strokeWidth="2" | ||
/> | ||
<rect width="32" height="2" x="8" y="18" fill="#4A5768" /> | ||
<rect width="2" height="26" x="19" y="11" fill="#4A5768" /> | ||
<rect width="32" height="2" x="8" y="24" fill="#4A5768" /> | ||
<rect width="32" height="2" x="8" y="30" fill="#4A5768" /> | ||
</g> | ||
</svg> | ||
) | ||
|
||
OutliersTableIcon.propTypes = { | ||
style: PropTypes.object, | ||
} | ||
|
||
export default OutliersTableIcon |
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
30 changes: 30 additions & 0 deletions
30
src/components/Layout/OutliersTable/OutliersTableLayout.js
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,30 @@ | ||
import { AXIS_ID_COLUMNS } from '@dhis2/analytics' | ||
import React from 'react' | ||
import DefaultAxis from '../DefaultLayout/DefaultAxis.js' | ||
import defaultAxisStyles from '../DefaultLayout/styles/DefaultAxis.style.js' | ||
import defaultLayoutStyles from '../DefaultLayout/styles/DefaultLayout.style.js' | ||
import outliersTableLayoutStyles from './styles/OutliersTableLayout.style.js' | ||
|
||
const Layout = () => ( | ||
<div id="layout-ct" style={defaultLayoutStyles.ct}> | ||
<div | ||
id="axis-group-1" | ||
style={{ | ||
...defaultLayoutStyles.axisGroup, | ||
...outliersTableLayoutStyles.axisGroupLeft, | ||
}} | ||
> | ||
<DefaultAxis | ||
axisId={AXIS_ID_COLUMNS} | ||
style={{ | ||
...defaultLayoutStyles.filters, | ||
...defaultAxisStyles.axisContainerLeft, | ||
}} | ||
/> | ||
</div> | ||
</div> | ||
) | ||
|
||
Layout.displayName = 'Layout' | ||
|
||
export default Layout |
5 changes: 5 additions & 0 deletions
5
src/components/Layout/OutliersTable/styles/OutliersTableLayout.style.js
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,5 @@ | ||
export default { | ||
axisGroupLeft: { | ||
flexBasis: '100%', | ||
}, | ||
} |
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