diff --git a/frontend/src/components/BookTable/index.tsx b/frontend/src/components/BookTable/index.tsx index b4bbdb6b..49310352 100644 --- a/frontend/src/components/BookTable/index.tsx +++ b/frontend/src/components/BookTable/index.tsx @@ -74,7 +74,7 @@ const BookTable = ({ // all sizes in 'em' const fontSize = theme.typography.fontSize; - const verticalHeightFrame = 3.625 + (showControls ? 3.7 : 0) + (showFooter ? 2.35 : 0); + const verticalHeightFrame = 3.25 + (showControls ? 3.7 : 0) + (showFooter ? 2.35 : 0); const verticalHeightRow = 3.25; const defaultPageSize = Math.max( Math.floor( @@ -500,7 +500,7 @@ const BookTable = ({ priority: 2, order: 5, normal: { - width: 5.8, + width: 5.9, object: currencyObj, }, }, @@ -706,7 +706,7 @@ const BookTable = ({ const gridComponents = function () { const components: GridComponentProps = { LoadingOverlay: LinearProgress, - NoResultsOverlay: NoResultsOverlay, + NoResultsOverlay, NoRowsOverlay: NoResultsOverlay, }; @@ -731,6 +731,8 @@ const BookTable = ({ > = ({ @@ -46,6 +48,8 @@ const DepthChart: React.FC = ({ limits, maxWidth, maxHeight, + fillContainer = false, + elevation = 6, }) => { const { t } = useTranslation(); const history = useHistory(); @@ -97,8 +101,13 @@ const DepthChart: React.FC = ({ setCenter(medianValue); setXRange(maxRange); setRangeSteps(rangeSteps); - } else if (lastDayPremium != undefined) { - setCenter(lastDayPremium); + } else { + if (lastDayPremium === undefined) { + const premiums: number[] = enrichedOrders.map((order) => order?.premium || 0); + setCenter(~~median(premiums)); + } else { + setCenter(lastDayPremium); + } setXRange(8); setRangeSteps(0.5); } @@ -276,22 +285,30 @@ const DepthChart: React.FC = ({ history.push('/order/' + point.data?.order?.id); }; + const em = theme.typography.fontSize; return ( - - + + {center == undefined || enrichedOrders.length < 1 ? (
) : ( - + = ({ container justifyContent='flex-start' alignItems='flex-start' - style={{ paddingLeft: 20 }} + style={{ paddingLeft: '1em' }} >