Skip to main content

Category Labels

The Category Labels card controls text labels rendered near each sample point when a Categories data role is populated.

Visibility

PropertyDescriptionDefault
ShowShow or hide all category labelsOff

Font

PropertyDescriptionDefault
Font FamilyLabel typefaceSegoe UI
Font SizeLabel size in pixels10 px
BoldBold weightOff
ItalicItalic styleOff
UnderlineUnderline decorationOff
ColorLabel text color#222222

Word Wrap

PropertyDescriptionDefault
Word WrapAutomatically split long labels across multiple linesOff
Max WidthMaximum label width in pixels before wrapping80 px

Background

PropertyDescriptionDefault
BackgroundShow a filled rectangle behind each labelOn
Background ColorFill color of the label background#FFFFFF
Background TransparencyOpacity of the background (0 % = fully opaque)30%

Smart Placement Algorithm

Labels are positioned using a multi-pass algorithm designed to avoid overlaps even on dense point clouds:

  1. Occupation grid — a 4 px cell grid tracks occupied areas (other labels, sample markers, plot borders)
  2. Clustering — nearby points are grouped so cluster labels do not stack on top of each other
  3. Candidate generation — 32 candidate positions are tested along a spiral around each point
  4. Leader line detection — candidates that would require the leader line to cross another point or label are penalized
  5. Refinement pass — remaining leader-line/label collisions are resolved
  6. Swap pass — pairs of intersecting leader lines are uncrossed by swapping their label positions
  7. Pull-back pass — labels that overflow the plot boundary are pulled back inside
Large datasets

The placement algorithm runs entirely client-side at render time. For very large category counts (hundreds of distinct labels), consider increasing Font Size slightly and enabling Word Wrap with a short Max Width to reduce individual label footprints and give the algorithm more room to work.

Leader lines

Leader lines connect each label to its sample point marker. Their length and angle are determined by the placement algorithm; they are not configurable independently. Leader lines are automatically hidden when a label is placed close enough to its point that no connector is needed.