@@ -272,33 +272,33 @@ const Dashboard = ({ classes, theme, ...props }) => {
272272 < Grid item lg = { 3 } md = { 4 } sm = { 6 } xs = { 12 } >
273273 < Widget title = "Revenue Breakdown" upperTitle className = { classes . card } >
274274 < Grid container spacing = { 16 } >
275- < Grid item sm = { 6 } >
276- < PieChart
277- width = { 160 }
278- height = { 144 }
279- margin = { { left : theme . spacing . unit * 2 } }
280- >
281- < Pie
282- data = { PieChartData }
283- innerRadius = { 45 }
284- outerRadius = { 60 }
285- dataKey = "value"
275+ < Grid item xs = { 6 } >
276+ < ResponsiveContainer width = "100%" height = { 144 } >
277+ < PieChart
278+ margin = { { left : theme . spacing . unit * 2 } }
286279 >
287- { PieChartData . map ( ( entry , index ) => (
288- < Cell
289- key = { `cell-${ index } ` }
290- fill = { theme . palette [ entry . color ] . main }
291- />
292- ) ) }
293- </ Pie >
294- </ PieChart >
280+ < Pie
281+ data = { PieChartData }
282+ innerRadius = { 45 }
283+ outerRadius = { 60 }
284+ dataKey = "value"
285+ >
286+ { PieChartData . map ( ( entry , index ) => (
287+ < Cell
288+ key = { `cell-${ index } ` }
289+ fill = { theme . palette [ entry . color ] . main }
290+ />
291+ ) ) }
292+ </ Pie >
293+ </ PieChart >
294+ </ ResponsiveContainer >
295295 </ Grid >
296- < Grid item sm = { 6 } >
296+ < Grid item xs = { 6 } >
297297 < div className = { classes . pieChartLegendWrapper } >
298298 { PieChartData . map ( ( { name, value, color } , index ) => (
299299 < div key = { color } className = { classes . legendItemContainer } >
300300 < Dot color = { color } />
301- < Typography > { name } </ Typography >
301+ < Typography style = { { whiteSpace : 'nowrap' } } > { name } </ Typography >
302302 < Typography color = "textSecondary" >
303303 { value }
304304 </ Typography >
@@ -311,6 +311,7 @@ const Dashboard = ({ classes, theme, ...props }) => {
311311 </ Grid >
312312 < Grid item xs = { 12 } >
313313 < Widget
314+ bodyClass = { classes . mainChartBody }
314315 header = {
315316 < div className = { classes . mainChartHeader } >
316317 < Typography variant = "headline" color = "textSecondary" >
@@ -348,7 +349,7 @@ const Dashboard = ({ classes, theme, ...props }) => {
348349 </ div >
349350 }
350351 >
351- < ResponsiveContainer width = "100%" height = { 350 } >
352+ < ResponsiveContainer width = "100%" minWidth = { 500 } height = { 350 } >
352353 < ComposedChart
353354 margin = { { top : 0 , right : - 15 , left : - 15 , bottom : 0 } }
354355 data = { mainChartData }
@@ -488,6 +489,9 @@ const styles = theme => ({
488489 serverOverviewElementChartWrapper : {
489490 width : "100%"
490491 } ,
492+ mainChartBody : {
493+ overflowX : 'auto' ,
494+ } ,
491495 mainChartHeader : {
492496 width : "100%" ,
493497 display : "flex" ,
@@ -504,8 +508,8 @@ const styles = theme => ({
504508 order : 3 ,
505509 width : '100%' ,
506510 justifyContent : 'center' ,
507- marginTop : theme . spacing . unit ,
508- marginBottom : theme . spacing . unit ,
511+ marginTop : theme . spacing . unit * 3 ,
512+ marginBottom : theme . spacing . unit * 2 ,
509513 }
510514 } ,
511515 mainChartHeaderLabel : {
0 commit comments