Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/components/_tooltips.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@
// Position
position: absolute;
z-index: 1;
inset-block-end: 50%;
// if --start / --end exist, then it's a line chart, and we calculate
// the larger of the two to place the tooltip above the line segment;
// if --start and --end don't exist, fallback to 0.5 * 100% = 50%,
// which is the default tooltip position for e.g. bar charts
inset-block-end: calc(max(var(--start, 0.5), var(--end, 0.5)) * 100%);
inset-inline-start: 50%;
transform: translateX(-50%); // translateX for both bar & column chart
Comment thread
ramiy marked this conversation as resolved.
Outdated
width: max-content;
padding: 5px 10px;
border-radius: 6px;
Expand Down