Skip to content
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

updates for dashboard UI responsiveness for cards and pie chart #391

Merged
merged 1 commit into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/src/components/Charts/OrgPieChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ export class OrgPieChart extends Component {
const { classes } = this.props;
return (
<div className={classes.container}>
<PieChart width={485} height={290} className={classes.chart}>
<Legend align="right" height={10} />
<PieChart width={250} height={290} className={classes.chart}>
<Legend align="right" />
<Pie
data={data}
dataKey="value"
Expand Down
37 changes: 30 additions & 7 deletions client/src/components/View/DashboardView.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,27 @@ const styles = theme => {
boxShadow: dark ? '1px 2px 2px rgb(215, 247, 247)' : undefined
},
count: {
marginTop: '55%',
color: dark ? '#ffffff' : undefined
color: dark ? '#ffffff' : undefined,
[theme.breakpoints.down('md')]: {
marginTop: '35%'
},
[theme.breakpoints.up('md')]: {
marginTop: '55%'
}
},
statistic: {
display: 'block',
float: 'left',
height: '100%',
width: '25%',
textAlign: 'center',
fontSize: '18pt',
color: dark ? '#ffffff' : '#000000'
color: dark ? '#ffffff' : '#000000',
[theme.breakpoints.down('md')]: {
fontSize: '8pt'
},
[theme.breakpoints.up('md')]: {
fontSize: '18pt'
}
},
vdivide: {
'&::after': {
Expand All @@ -65,8 +75,14 @@ const styles = theme => {
},
avatar: {
justifyContent: 'center',
marginLeft: '60%',
marginTop: '65%'
[theme.breakpoints.down('md')]: {
marginLeft: '25%',
marginTop: '15%'
},
[theme.breakpoints.up('md')]: {
marginLeft: '60%',
marginTop: '65%'
}
},
node: {
color: dark ? '#183a37' : '#21295c',
Expand All @@ -92,6 +108,11 @@ const styles = theme => {
},
center: {
textAlign: 'center'
},
pie: {
[theme.breakpoints.up('md')]: {
marginLeft: '25%'
}
}
};
};
Expand Down Expand Up @@ -255,7 +276,9 @@ export class DashboardView extends Component {
<Card className={`${classes.section} ${classes.center}`}>
<h5>Transactions by Organization</h5>
<hr />
<OrgPieChart transactionByOrg={transactionByOrg} />
<div className={classes.pie}>
<OrgPieChart transactionByOrg={transactionByOrg} />
</div>
</Card>
</Col>
</Row>
Expand Down