Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Dashboard): Do not clip tooltips #349

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions packages/app/src/DashboardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ const Tile = forwardRef(

return (
<div
className={`bg-hdx-dark p-3 ${className} d-flex flex-column ${
className={`bg-hdx-dark p-3 ${className} d-flex flex-column dashboard-chart ${
isHighlighed && 'dashboard-chart-highlighted'
}`}
id={`chart-${chart.id}`}
Expand Down Expand Up @@ -320,7 +320,7 @@ const Tile = forwardRef(
</div>
) : (
<div
className="fs-7 text-muted flex-grow-1 overflow-hidden"
className="fs-7 text-muted flex-grow-1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only thing I can think of that we added this for is possibly for Y axis overflow (like a million legend items overflowing the tile). Though at this point I think we have legend overflow handling as well so should be safe to remove, unless we still need a overflow y hidden for some reason.

onMouseDown={e => e.stopPropagation()}
>
<ErrorBoundary
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/HDXMultiSeriesTimeChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const HDXLineChartTooltip = withErrorBoundary(
.sort((a: any, b: any) => b.value - a.value)
.map((p: any) => (
<div key={p.dataKey} style={{ color: p.color }}>
{truncateMiddle(p.name ?? p.dataKey, 70)}:{' '}
{truncateMiddle(p.name ?? p.dataKey, 70)}:&nbsp;
{numberFormat ? formatNumber(p.value, numberFormat) : p.value}
</div>
))}
Expand Down
14 changes: 10 additions & 4 deletions packages/app/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,16 @@ div.react-datepicker {
border: 1px solid rgba(255, 166, 0, 0.5);
}

.dashboard-chart:hover {
z-index: 10000;
}

.recharts-tooltip-wrapper {
&:focus-visible {
outline: none;
}
}

@keyframes highlightedChart {
0% {
background-color: rgba(255, 166, 0, 0.5);
Expand All @@ -797,7 +807,3 @@ div.react-datepicker {
color: white;
}
}

// html {
// filter: invert(1) hue-rotate(180deg);
// }
Loading