Skip to content
Bug reportNov 13, 2026· 0:23· 9 views

Vega editor: avoidBaseMark label placement fails on line charts — labels are hidden instead of repositioned

0:23 total

Comments · 0

Be the first to comment.

Bug reportby SceneRecap AI

lowVega label transform (vega-label) handling of avoidBaseMark and avoidMarks for line/area base marks under Vega 6.4.0. Also check the editor's schema validation and v5 vs v6 mismatch handling.
os: macOSdpr: 1url: /editorlocale: en-USbrowser: Chromium 151.0.7922.34timezone: Europe/Berlinversions: Vega 6.4.0, Vega-Lite 6.5.0, Vega-Tooltip 1.1.0, Editor 1747515viewport: 1280x720editor_mode: Vegaspec_schema: https://vega.github.io/schema/vega/v5.json

Repro steps

  1. 1.Open the Vega Editor at /editor with the mode dropdown set to Vega.
  2. 2.Load a Vega v5 spec described as 'Sum of Cost by Product Family'. It sets width 600 and height 400, and data 'source_0' holds 13 PRODUCT_FAMILY/Cost rows. The spec draws a line with a text label at each point.
  3. 3.Let the chart render with Run set to Auto.
  4. 4.Inspect the point labels against the line, for example 877 at Energy Star TV, 2915 at Smart Phones and 1568 at Hobbies & Creative Arts.
  5. 5.Scroll the code editor to the scales section. It shows 'xscale' of type 'point' and 'yscale' of type 'linear' with nice true and zero true.
  6. 6.Return to the chart and confirm the labels are still drawn on the line.

Expected

The spec is meant to keep labels off the base line mark (the reported intent is avoidBaseMark label placement). Each value label should be moved to a free position next to its point, so it does not sit on the line stroke.

Actual

All 13 value labels render and stay visible, but several are drawn on top of or touching the line stroke. Examples are 877 at Energy Star TV, 2915 at Smart Phones and 1568 at Hobbies & Creative Arts. The labels are not moved away from the line. The recording does not show any label being hidden. It shows labels overlapping the line, not missing.

Evidence

visualOn first render, the 877 label at Energy Star TV and the 2915 label at Smart Phones are drawn over the line stroke. The 7765 label at Audio sits against the y axis at the top of the line.
visualAll 13 labels are visible: 7765, 4289, 3486, 3403, 877, 7439, 1568, 2051, 672, 1051, 4463, 2915 and 7663. None of them are hidden.
visualThe labels remain in the same overlapping positions while the cursor hovers over the chart.
visualThe editor shows the scales: 'xscale' of type 'point' with domain source_0.PRODUCT_FAMILY and range width.
visualThe editor shows 'yscale' of type 'linear' with domain source_0.Cost, nice true and zero true. Axes start with orient bottom and labelAngle -90. The label/mark definitions are not visible in the recording.
visualThe 1568 label at Hobbies & Creative Arts still sits directly next to the line segment and has not been repositioned.
console[Vega-Editor] The specification expects Vega v5 but the editor uses v6.4.0.
consoleThere are several '[Vega-Editor] Validation:' warnings for missing required properties: 'data', 'layer', 'repeat', 'concat', 'vconcat' and 'hconcat'. These look like Vega-Lite schema checks running against a Vega spec.
consoleDispatchingLogger: setState not initialized
visualThe LOGS tab badge shows (1).
Issue markdown (copy-paste ready)
## Summary
In the Vega Editor, value labels on a line chart are drawn on top of the line instead of being moved off it. The report is about avoidBaseMark label placement. The label transform section of the spec is not visible in the recording.

## Environment
- Chromium 151.0.7922.34, macOS, 1280x720, dpr 1
- Vega 6.4.0, Vega-Lite 6.5.0, Vega-Tooltip 1.1.0, Editor 1747515
- Spec `$schema`: vega/v5.json

## Steps to reproduce
1. Open `/editor` in Vega mode (0s).
2. Load the 'Sum of Cost by Product Family' line chart spec. It sets width 600, height 400 and 13 rows in `source_0` (0s).
3. Let it render with Run set to Auto (0s).
4. Inspect the labels at Energy Star TV, Smart Phones and Hobbies & Creative Arts (7s, 21s).

## Expected
Labels should be placed so they avoid the base line mark.

## Actual
All 13 labels are visible, but several sit on the line stroke: 877 (0s), 2915 (0s) and 1568 (21s). They are not repositioned. No label was seen being hidden.

## Evidence
- 0s: 877 and 2915 labels overlap the line.
- 15s and 17s: scales are `xscale` of type point and `yscale` of type linear with nice and zero set.
- 0s console: `The specification expects Vega v5 but the editor uses v6.4.0.`
- 0s console: Vega-Lite style validation warnings (missing 'data', 'layer', 'repeat', 'concat', 'vconcat', 'hconcat').
- 0s console: `DispatchingLogger: setState not initialized`.

## Suggested area
vega-label `avoidBaseMark` / `avoidMarks` handling for line marks in Vega 6.4.0.

*Recorded with SceneRecap.*

Your recordings could explain themselves too.

Free plan · silent recordings welcome · bug reports included.

Try SceneRecap free →
Vega editor: avoidBaseMark label placement fails on line charts — labels are hidden instead of repositioned · SceneRecap