Skip to content

Commit b4a6937

Browse files
committed
Fix cursor-pointer, move tooltip to above the cursor
1 parent 3f00256 commit b4a6937

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

assets/js/dashboard/stats/graph/main-graph.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,10 @@ export const MainGraph = ({
331331
ref={svgRef}
332332
viewBox={`0 0 ${width} ${height}`}
333333
className={classNames('w-full h-auto', {
334-
['cursor-pointer']: showZoomToPeriod
334+
['cursor-pointer']:
335+
showZoomToPeriod &&
336+
selectedIndex !== null &&
337+
remappedData[selectedIndex]
335338
})}
336339
/>
337340
{selectedIndex !== null && remappedData[selectedIndex] && (
@@ -381,7 +384,8 @@ const GraphTooltip = ({
381384
top: y
382385
}}
383386
className={classNames(
384-
'absolute z-200 bg-gray-800 py-3 px-4 rounded-md z-[100] min-w-[180px] pointer-events-none shadow shadow-gray-200 dark:shadow-gray-850',
387+
'absolute bg-gray-800 py-3 px-4 rounded-md z-[100] min-w-[180px] pointer-events-none shadow shadow-gray-200 dark:shadow-gray-850',
388+
'-translate-y-full',
385389
{
386390
'translate-x-2': !isLeftOfCursor,
387391
'-translate-x-full': isLeftOfCursor

0 commit comments

Comments
 (0)