Skip to content

Commit

Permalink
updates for dashboard UI responsiveness for cards and pie chart
Browse files Browse the repository at this point in the history
Signed-off-by: Ankit Kokane <[email protected]>
  • Loading branch information
thedudeontitan committed May 16, 2023
1 parent 8c5220e commit 976a84a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
2 changes: 1 addition & 1 deletion client/src/components/Charts/OrgPieChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class OrgPieChart extends Component {
const { classes } = this.props;
return (
<div className={classes.container}>
<PieChart width={485} height={290} className={classes.chart}>
<PieChart width={250} height={290} className={classes.chart}>
<Legend align="right" height={10} />
<Pie
data={data}
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

0 comments on commit 976a84a

Please sign in to comment.