Tweak chart and tooltip positioning

This commit is contained in:
Nicholas Zuber 2018-11-15 00:17:32 -05:00
parent 30d129c20d
commit 43864a266d
3 changed files with 6 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 407 KiB

After

Width:  |  Height:  |  Size: 405 KiB

View File

@ -518,6 +518,7 @@ const BarContainer = styled('div')({
const stripe_size = 3; const stripe_size = 3;
const Bar = styled('div')({ const Bar = styled('div')({
cursor: 'pointer',
position: 'relative', position: 'relative',
width: 20, width: 20,
minHeight: 5, minHeight: 5,
@ -758,11 +759,10 @@ export default function Scene ({
</EnhancedSidebarLink> </EnhancedSidebarLink>
<div style={{ <div style={{
padding: 14, padding: 14,
margin: 8,
borderRadius: 4, borderRadius: 4,
height: 100, height: 100,
fontSize: 11, fontSize: 11,
marginBottom: 20, margin: '24px 8px 20px'
}}> }}>
<BarGraph> <BarGraph>
{/* Last week's statistics */} {/* Last week's statistics */}
@ -793,8 +793,10 @@ export default function Scene ({
{lastWeekStats.map((_, i) => ( {lastWeekStats.map((_, i) => (
<EnhancedBar <EnhancedBar
key={i} key={i}
style={{width: 33}}
tooltip={getWeekday(i)} tooltip={getWeekday(i)}
tooltipOffsetY={50} tooltipOffsetY={-15}
tooltipOffsetX={5}
tooltipSpeed={0} tooltipSpeed={0}
height={100} height={100}
/> />

View File

@ -91,5 +91,5 @@ p {
white-space: nowrap; white-space: nowrap;
transform: translateX(-35%) translateY(-15px); transform: translateX(-35%) translateY(-15px);
opacity: 0; opacity: 0;
transition: all 100ms ease-in; transition: all 75ms ease-in;
} }