mirror of
https://github.com/nickzuber/meteorite.git
synced 2024-09-11 11:36:03 +03:00
Position stat tooltip on top of bar
This commit is contained in:
parent
43864a266d
commit
cb03dc5c34
Binary file not shown.
Before Width: | Height: | Size: 405 KiB After Width: | Height: | Size: 406 KiB |
@ -518,7 +518,6 @@ const BarContainer = styled('div')({
|
||||
|
||||
const stripe_size = 3;
|
||||
const Bar = styled('div')({
|
||||
cursor: 'pointer',
|
||||
position: 'relative',
|
||||
width: 20,
|
||||
minHeight: 5,
|
||||
@ -790,12 +789,14 @@ export default function Scene ({
|
||||
</BarContainer>
|
||||
{/* Wrapper for tooltips */}
|
||||
<BarContainer opacity={0}>
|
||||
{lastWeekStats.map((_, i) => (
|
||||
{thisWeekStats.map((dayStats, i) => (
|
||||
<EnhancedBar
|
||||
key={i}
|
||||
style={{width: 33}}
|
||||
tooltip={getWeekday(i)}
|
||||
tooltipOffsetY={-15}
|
||||
tooltipOffsetY={
|
||||
(Math.max((dayStats / highestStagedCount) * 100, 5) * -1) + 85
|
||||
}
|
||||
tooltipOffsetX={5}
|
||||
tooltipSpeed={0}
|
||||
height={100}
|
||||
|
Loading…
Reference in New Issue
Block a user