Skip to content

Label placement system: remaining work tracker #6

@madsCodeBuddy

Description

@madsCodeBuddy

Status: On Hold

An automatic label collision resolver was prototyped but is not ready to merge.

What was built

  • Occupancy grid — rasterizes ellipse/line/point glyphs into pixel-space grid
  • Upper-left preferred placement — initial label positions biased upper-left of anchor
  • Glyph-aware force placement — occupancy gradient descent pushes labels away from glyphs
  • Leader lines — dotted lines connecting displaced labels to anchors
  • resolve_label_overlaps() — force-directed solver with repulsion, attraction springs, occupancy forces

Remaining problems

  1. Labels still overlap glyphs — solver reduces label-label overlap but labels land on ellipses
  2. Solver doesn't converge — 6 overlapping pairs remain after 200 iterations on the 15-label Boyd dataset
  3. Occupancy grid is slow — enabling glyph_data causes timeout on moderate datasets
  4. Zero leader lines triggered — distance threshold too generous, displaced labels don't cross it
  5. Integration not started — wiring into add_predefined_processes / add_processes blocked by Pandas .align() name clash and np.log10(int) TypeError

Alternative approaches to consider

  • Simulated annealing (better at escaping local minima)
  • Greedy placement with backtracking
  • Constraint-based optimization
  • Manual offset overrides in CSV (already partially supported via x_offset/y_offset columns)

Migrated from timeSpace-private #234

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions