mirror of
https://github.com/nickzuber/meteorite.git
synced 2024-11-29 09:31:15 +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 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,
|
||||||
@ -790,12 +789,14 @@ export default function Scene ({
|
|||||||
</BarContainer>
|
</BarContainer>
|
||||||
{/* Wrapper for tooltips */}
|
{/* Wrapper for tooltips */}
|
||||||
<BarContainer opacity={0}>
|
<BarContainer opacity={0}>
|
||||||
{lastWeekStats.map((_, i) => (
|
{thisWeekStats.map((dayStats, i) => (
|
||||||
<EnhancedBar
|
<EnhancedBar
|
||||||
key={i}
|
key={i}
|
||||||
style={{width: 33}}
|
style={{width: 33}}
|
||||||
tooltip={getWeekday(i)}
|
tooltip={getWeekday(i)}
|
||||||
tooltipOffsetY={-15}
|
tooltipOffsetY={
|
||||||
|
(Math.max((dayStats / highestStagedCount) * 100, 5) * -1) + 85
|
||||||
|
}
|
||||||
tooltipOffsetX={5}
|
tooltipOffsetX={5}
|
||||||
tooltipSpeed={0}
|
tooltipSpeed={0}
|
||||||
height={100}
|
height={100}
|
||||||
|
Loading…
Reference in New Issue
Block a user