HomeLabHire Me
ml-ui111 components

Get started

IntroductionInstallation

UI

Dots

Dot AccordionDot CalendarDot CheckboxDot CodeDot CommandDot ContentsDot CountdownDot CrossingDot FuseDot GaugeDot InstallDot KnobDot LogosDot MenuDot PaginationDot PasswordDot Price RangeDot PricingDot ProgressDot QueueDot RatingDot Reading ProgressDot SelectDot SignupDot SliderDot StatusDot StepperDot SwitchDot TabsDot ToastDot TooltipFlip-Dot CounterLED Marquee

Dither

Dither AvatarDither BannerDither CompareDither GlobeDither PortraitDither SkeletonDither TrailDither UploadDot CookiesDot DialogDot KeysDot ReceiptDot VariantsLenticular Card

More

Pollen TrailSplit-FlapTheme Toggle

Text

Dither RotatorDot TypeEnigma TextInk Print

Data viz

Dots

Contribution FieldDot BarsDot ChartDot Waffle

Dither

Dither DensityDither MapDither Stack

Media

Dots

Dot EqualizerDot WaveformVoice Note

Dither

Dither Scrubber

AI

Agent StepsAnswer VersionsCitation ChipConfidence GlassContext MeterDiffusion ImageDiffusion TextDither MaskDoc ReaderDot DictationGenerate ButtonGhost TextModel PickerPrompt BarResponse ActionsRevising TextSpoken ReplyThinking OrbThinking TraceToken MeterToken StreamWord Alternatives

Useful

Arrival TimeBest ShotCareer LineForgiving SearchGesture PadHeard AsHonest PinImage PaletteLikeness GridNear Miss SearchRain DropsSoft CorrectSpending SortSticker LiftTaste Ledger

Backgrounds

ButterfliesDandelionsDuck PondFirefliesKoi PondLight WellMarigoldsTrain WindowWhite Blossom

ml-ui / Data viz

Dither Density

When there are too many points to see one by one, each cell of the plot gets ink for how crowded it is, softened a little so a crowd reads as a shape, on a square-root scale so its thin edges still print, and never blank where there's a point at all. It develops in like a print the first time it's seen and eases to new data. Point at it for a dotted cross and how many points are near.

Needs: None. Canvas 2D.

Customize

Props

PropTypeDefaultDescription
points[number, number][]requiredThe points, as [x, y]. Thousands are fine.
xLabelstring–What the x axis measures, with its unit.
yLabelstring–What the y axis measures, with its unit.
formatX(value: number) => string–How an x value reads.
formatY(value: number) => string–How a y value reads.
heightnumber280Height of the plot in px. It fills its container's width.
tonestring–The ink. The page's accent by default.
cellnumber3Size of one dither cell in px.
spreadnumber2How far each point's ink spreads, in cells. 0 prints each point on its own.
labelstring"Density of points"What the points are, for screen readers.
classNamestring–Class on the chart.
styleCSSProperties–Style on the chart.
← Contribution FieldDither Map →