v2.5.0
-
Top-level predicate definitions have been deprecated. Test expressions can now be specified inline as part of a production rule.
-
Additional
scale,iscale,inrange, andindatafunctions have been added to the expression language to cover functionality provided by deprecated predicates. Note: these functions may only be used in signal stream definitions or production rule test expressions. -
Vega now styles the mouse pointer based on a new
cursormark property or specially-namedcursorsignal. -
A new
ranktransform computes an ascending rank score for data tuples based on key fields or their observed order. -
fieldis now an optional parameter for the Streaming Data operators if the signal value is an object. Iffieldis specified for object signal values, it is used as a key field for toggle and removals (i.e., the datum whosefieldmatches that of the signal value is toggled or removed). If nofieldis specified, all properties found in the signal value object are used as key fields.To update existing specifications to correspond to this behaviour:
- If a
fieldis used in a "modify" transform, and the correspondingsignalreturns an object in itsexprdefinition, ensure that thefieldmatches the key property/properties of the object. - Update any references made to data values found in this modified dataset. Signal values are no longer nested under the modified
field, but are at the top-level; their properties can be referenced directly.
For example, see the diff for the DimpVis example triggered by this change. The
fieldof thetoggletransform in thetrackCountriesdataset was changed tocountry(a field found on theactivesignal object). When using data values from this dataset, we can reference fields directly, rather than via a nested property. - If a
-
Canonical example specifications are now included with every release.
-
The event selector syntax has been extracted to a separate vega-event-selector package available over NPM.
-
The
bandWidthproperty of ordinal scales has been renamed tobandSize. -
Clearer error messages are thrown if an unknown transform, signal, or data source is used (h/t @nyurik).
-
Fixed bug with offeting axis titles (h/t @floribon).
-
category20bandcategory20cadded to the schema as permissable values for scale ranges (h/t @okal). -
Fixed bug with scale function being exposed as axis labels (#440).
-
Fixed bug with legend offseting when axis displayed grid lines (#476).
-
Fixed bug with grid lines not extending correctly when axes are offset (#519).
-
Legends and axis should now share the same formatter options (#504, #506).