To prevent text overflow in Deneb (Vega-Lite):
-
Use "clip": true in the mark to confine text.
-
Add "limit" in encode to restrict width (e.g., 50px).
-
Optionally add "ellipsis": "…" to truncate overflow.
Example:
"mark": { "type": "text", "clip": true },
"encode": {
"enter": {
"text": {"field": "label"},
"limit": {"value": 50},
"ellipsis": {"value": "…"},
"align": {"value": "center"},
"baseline": {"value": "middle"}
}
}