GODRICH
#css-animation#button#loader#transition#scroll#dashboard#ui#design-trends

06A Label Fit That Measures the Cell Then Shrinks or Hides the Text

Text width is estimated as character count times font size and compared with the cell width and height minus the inner padding. If it fits it stays, if not the font size steps down one level at a time, and at the minimum size the label is hidden so only the number remains. The board on the right never measures, so text spills into neighbor cells as the contrast.

Best forCharts with many small cells where text tends to overlap

CHAR_WFONT_STEPHIDE_MIN
A Label Fit That Measures the Cell Then Shrinks or Hides the Text
Open in a new tab

06 A Label Fit That Measures the Cell Then Shrinks or Hides the Text — Measured area 38.724% · moving frames 22/23Original by GODRICH · SCSS and React ship in the zip · Treemap Chart: 9 Canvas Layout Scenes

The post this demo lives in

Treemap Chart: 9 Canvas Layout Scenes - preview of all 9 demosTreemap Chart: 9 Canvas Layout ScenesHow does a treemap chart split cells? 01 re-measures the worst ratio as each cell joins a row, 02 springs cells to new s See all demos in this post

If you like this effect - similar demos