Skip to content

Commit

Permalink
Show histogram tooltips that bleed out of content box. (tensorflow#5631)
Browse files Browse the repository at this point in the history
* Motivation for features / changes

  The small histogram tooltip can be cutoff by the top or right edges (Googlers, see b/226775031).

* Technical description of changes

  A couple of ancestor elements of the tooltip element currently set `overflow: hidden`. We change these elements so that the effective value is 'overflow: visible'.

  This has the somewhat unintended side effect of exposing an additional ~1px height flat line just above the x axis (because the set of lines in the '.content' element ever so slightly overflow). This is probably ok since we'd prefer for the user to see all histogram lines. We should consider in the future tightening up the histogram rendering so that all the lines fit nicely into the '.content' element. (Googlers, see screenshot diffs in cl/437279846).
  • Loading branch information
bmd3k authored and dna2github committed May 1, 2023
1 parent e3df848 commit a924e71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Expand Up @@ -106,7 +106,6 @@ mat-spinner {

tb-histogram {
flex-grow: 1;
overflow: hidden;
}

.empty-message {
Expand Down
6 changes: 6 additions & 0 deletions tensorboard/webapp/widgets/histogram/histogram_component.scss
Expand Up @@ -140,6 +140,12 @@ svg {

.content {
grid-area: content;
// Allow overflow to be visible so that the tooltip can be shown for points
// near the edges.
overflow: visible;
// Raise the content area above the axes so that the tooltip can be shown over
// the axes marks.
z-index: 1;

.tick {
stroke-width: 1px;
Expand Down

0 comments on commit a924e71

Please sign in to comment.