Use this for user-supplied labels. Extra columns are preserved so interactive applications can carry styling, tooltip, or grouping metadata alongside the core label position columns.
Examples
as_drag_labels(data.frame(
label_id = "note-1", region = "North", label = "Check this",
x = 50000, y = 150000, tooltip = "extra metadata"
))
#> label_id region label x y tooltip label_type width_px
#> 1 note-1 North Check this 50000 150000 extra metadata label NA
#> height_px connector connector_type connector_mid_x connector_mid_y
#> 1 NA FALSE straight NA NA
#> connector_start_x connector_start_y
#> 1 NA NA
