npm / vega
vega
What changed in vega 5 to 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-28.
8 breaking6 security11 new APIs and options1 behavior and defaults21 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initvega 646 changes
Breaking changes 8
Ordinal scales with empty initial domains now fall back to five colors when no explicit count is set.
Ordinal scales using continuous color schemes now honor range.count, cycling colors if the count is smaller than the domain.
then is now included among disallowed object properties.
Canvas and SVG DOM roots now use vertical-align: bottom, removing the baseline-descender gap; containing inline line boxes may shrink, while exported SVG is unaffected.
Dots in aggregated field names are replaced with underscores.
The max interval is exclusive rather than inclusive.
Legend and title labels align to the start of the chart frame.
Stroke bounds expand by half the stroke width with join-aware slack; bounds are tighter and miter joins are honored by default.
Security 5
A prototype pollution vulnerability in mergeConfig is avoided.
A security fix was applied to vega-expression code generation.
A security fix was applied to vega-functions modify.
A security fix was applied to vega-interpreter evaluation.
A security fix was applied to vega-selections tuples.
New APIs and options 11
A new event source lets specs react to container size changes, including reflows and resizable panels.
The expression language now includes the d3-ease easing functions.
Adds a function to read a projection's fitted translation, mirroring geoScale().
Adds interpolateLinear to the expression language.
Adds Monday-based ISO 8601 week timeunit support.
Adds Monday-based ISO 8601 year-week timeunit support.
encodeURIComponent is added to built-in expressions.
Axis tick datums expose an integer tickIndex field for use in label expressions.
The timeunit transform adds the inferUnits option.
The timeunit transform accepts the auto unit.
vega-interpreter adds encodeURIComponent.
Behavior and default changes 1
An axis description overrides the default aria-label.
Fixes and other changes 21
Canvas style size is now updated when devicePixelRatio is 1.
CLI config file loading is restored; --config had been silently ignored since the ESM migration.
Code generation now applies DisallowedObjectProperties to quoted object keys.
CLI locale file loading is restored; --format had been silently ignored since the ESM migration.
Adds the missing hypot function to vega-interpreter.
The generic mergeConfig signature is restored.
Unsupported on* properties are ignored and warned about instead of being set as attributes.
Global and sticky regexp literals are recreated per interpreter evaluation so lastIndex does not carry across datums.
Signals are now resolved in unioned scale domains.
CLI locale file loading is restored; --timeFormat had been silently ignored since the ESM migration.
The generic writeConfig signature is restored.
The bin transform returns the adjusted stop.
Bounds are calculated correctly for an empty visualization with an absent legend title.
Event point calculations now respect CSS transforms.
Stacking handles null and empty-string categories correctly.
The single-element population case is calculated correctly.
Negative variance deviation from streaming removes is clamped.
SVG paths containing a closepath z without a following space separator are parsed.
The tickMinStep option is handled correctly.
The single-element population case is calculated correctly.
The window transform preserves the sign of frame bounds.
vega 51 changes
Security 1
Fixes a security advisory for v5 releases and improves expressions.