Releases: vega/vega
v5.3.0
v5.2.0
Changes from v5.1.0:
vega
- Add
font-size-stepstest specification.
vega-cli
- Add log level (-l) parameter. (#1677)
- Add custom logger for stderr only.
vega-dataflow
- Add Dataflow
loggergetter/setter. - Fix topological sort (rank) for signal listener operators. (#1672)
vega-functions
- Safeguard scale function, return undefined for undefined input.
vega-parser
- Add
dx,dyproperties for title guides. - Fix double invocation by merging signal/scale event streams. (#1672)
- Fix scale parser to allow array-valued range entries.
vega-schema
- Add
dx,dyproperties for title guides. - Fix schema to allow array-valued range entries.
vega-typings
- Add
dx,dyproperties for title guides. - Update typings to follow vega-util additions.
- Fix typings for scaled encode entries.
vega-util
- Add method argument to logger.
vega-view
- Add View constructor option to set the logger.
- Prevent event extension if no active renderer.
v5.1.0
Vega v5.1.0
Notable Additions:
- Add
formatTypeproperty (one of"number"or"time") for axes and legends. If the underlying scale has atickFormatmethod, that will be used regardless offormatType. Otherwise,formatTypecontrols whether or not number or date-time format specifiers are expected.
Detailed Changes:
docs
- Document
formatTypeproperty for axes and legends.
vega-dataflow
- Update internal heap implementation to simplify code.
- Fix dataflow evaluation to ensure no async interleaving of
runAftercallbacks.
vega-encode
- Add
formatTypeparameter for axis ticks and legend entries.
vega-parser
- Add
formatTypeparameter for axes and legends. (#1673)
vega-schema
- Update to include
formatTypeproperty. - Update to include top-level
styleproperty.
vega-typings
- Update to include top-level
styleproperty. - Update to include signal
initproperty.
v5.0.0
Vega v5.0.0
Notable Additions:
- The Vega project and sub-module dependencies have been reorganized into a single monorepo (
vega/vega) to streamline development. - The
symbolmark type now support ananglechannel for rotation, and new shape types (wedge,arrow). - Axes and legends support a new range of layout customizations, including title positioning properties (
titleOrient,titleAnchor) and legend layout configuration (config.legend.layout). - Thanks to extensions in d3-scale, Vega now includes a symmetric log (
symlog) scale type. - Vega now supports color interpolation not just for linear scales, but for all continuous scales. Internally, Vega will select among standard linear, sequential, or diverging scale implementations based on scale domain and range. A similar logic applies for
log,pow,sqrt, andsymlogscales. In addition, the scaleinterpolateproperty can now be used with any scale that supports a scheme-valued range, allowing customized color interpolation for continuous, ordinal, or discretizing scales when passing an array of color values to theschemeproperty. - The
sequentialscale type has been deprecated, but remains for backwards-compatilibility. Use thelinearscale type instead. - The Vega dataflow now supports asynchronous evaluation. Internal dataflow operators can return a Promise; dataflow evaluation will then pause and resume when the Promise resolves. This enables exciting new capabilities such as dynamic loading from external data sources. The View API
runmethod works much as before, but internally invokes asynchronous processing and returns immediately. We recommend usingview.runAsyncwhenever possible; invokethenon (orawait) the returned Promise to perform actions once dataflow evaluation completes. - Starting with v4.4, Vega started using more ES6+ constructs directly and dropped Internet Explorer support (in part due to changes in underlying d3 libraries). This trend has continued in the v5 release, most notably including Vega's use of
asyncfunctions and theawaitkeyword. Some users migrating to Vega 5.0 from an earlier version may discover incompatibilities with older browsers. If backwards compatibility is essential, we recommend using a transpiler framework such as Babel.
Breaking Specification Changes:
- The legend
strokeWidthproperty now accepts a scale that maps data values to stroke widths. It no longer corresponds to the stroke width of the legend border. However, thelegend.strokeWidthconfig property still corresponds to the legend border thickness. - Continuous color schemes no longer support discrete variants as part of the scheme name. Scheme names such as
blues-7are no longer supported; instead use{"scheme": "blues", "count": 7}. - The
bin-linearscale type has been removed. Instead, use alinearscale that uses the newbinsparameter. - Remove deprecated Vega-Lite selection expression functions
vlSingle,vlSingleDomain,vlMulti,vlMultiDomain,vlInterval, andvlIntervalDomain. - As a consequence of the two changes above, versions of Vega-Lite prior to v3 will not work with Vega v5. Please adjust your versions accordingly.
Breaking API Changes:
- The vega-lib package has been removed; use vega directly instead. The vega package no longer includes an optional node-canvas dependency. If you want to use Vega in server-side projects, your project should include an explicit node-canvas dependency.
- The vega package no longer directly provides command line utilities; use the new vega-cli package instead, which includes a node-canvas dependency. The vega-cli package includes a new
vg2pdfcommand for rendering PDF output! - The vega package no longer exports TypeScript typings for the
vega-libmodule; use thevegamodule instead. - The runtime and internal APIs have other breaking changes, though most Vega users will not be affected. See the full change log below for more.
Detailed Changes:
docs
- Update documentation to reflect JSON schema and API updates.
- Update colors in volcano example.
- Update edge bundling examples to use
"stroke"symbol type. - Update miscellaneous examples to use more recent features.
- Add wind vectors example. (Thanks @jwoLondon!)
vega
- Add test specifications and scenes for dynamic data loading.
- Add test specification and scene for symbol angle.
- Add JSON schema validation test.
- Update test specifications to use
linearrather thansequentialscale type. - Update
flush-axis-labelsandlegend-continuoustest specifications to uselabelSeparation. - Update
layout-splomtest specification to include legendAnchor. - Update
legendstest specification to include layout options. - Update
scatter-plottest specification to test legend configurations. - Update tests to use
randomLCGutility from vega-statistics. - Update test runners to use new View constructor options.
- Update rendered scenegraphs for test specifications.
- Update exports to use vega-functions package.
- Drop vega-lib module for typings.
- Drop tv4, use ajv for validation.
- Drop d3-scale-chromatic dependency.
vega-cli
- Create new package for Vega command-line utilities.
- Add
vg2pdfcommand for generating PDF output. - Add
formatandtimeFormatoptions to command line utilities. (#1667) - Update to use
randomLCGutility from vega-statistics. - Update to use new View constructor options.
vega-dataflow
- Breaking: Decouple dataflow
requestfrom pending load tracker. - Add dataflow
preloadmethod for initial data loading. - Add async evaluation support. Transform operators can now return a Promise that resolves to a Pulse.
- Add support for async callback functions within dataflow evaluation.
- Add passing of
responseTypefrom format to loader options. - Update data loading and dataflow methods to use async/await.
- Update runtime, move evaluation logic to internal
evaluatemethod. - Update
runandrunAsyncto accept optionalprerunandpostruncallbacks. - Add async evaluation tests.
vega-encode
- Breaking: Remove
bin-linearscale support. Use newbinsparameter instead. - Breaking: Remove
utcIntervalmethod. Use updatedtimeIntervalmethod instead. - Add automatic scale selection for linear, log, pow, sqrt, symlog types. If a color range is specified, sequential or diverging scale implementations will be used depending on the domain length.
- Add interpolated color array input to
schemeproperty. (Fix #995) - Add color interpolate support for all scheme-compatible scales.
- Add support for
binsproperty to guide tick/legend generation. - Add
minstepparameter to AxisTicks and LegendEntries transforms. - Add bin boundary generation from
binsparameter object. - Add domain specification using
binsproperty forBinOrdinalscales. - Update legend label formats for discrete color gradients.
- Update unit tests to work with async evaluation.
- Move interpolation utilities to vega-scale.
- Drop logic for discretized scale lookup.
- Drop
BinOrdinalspecial case for legend label generation, usebinsinstead.
vega-expression
- Add exports for AST node type constants.
- Update README.md to clarify the constants and functions provided. (#1556)
vega-functions
- Create new package for Vega-specific expression functions and code generation.
- Add
panSymlogandzoomSymlogexpression functions. - Add
lerpexpression function. - Add
intersectexpression function. This function is not yet part of the official expression language, but is exposed for integration and testing with Vega-Lite. Theintersectfunction has the signatureintersect(box, options, group), where:boxis a rectangular brush region defined as[[x1, y1], [x2, y2]]optionsis an optional object withmarktypeormarknameproperties (strings or arrays) for limiting the intersection tests to specific marks.groupis an optional scenegraph group item that serves as the root of the search. If not provided, the full scenegraph is used.
- Update README.md to clarify the functions provided. (#1556)
- Fix
gradientfunction to handle zero span domains, add test cases. (#1479)
vega-loader
- Add
responseoption to direct fetch response processing. - Add
responseTypeproperty toformatread methods. - Update loader to use async / await.
- Update
sanitizemethod to copyrelloader option to the output result. The scenegraph handler will copy this over as an HTMLrelattribute of a generatedaelement. (#1542)
vega-parser
- Breaking: Add
strokeWidthscale support for legends, remove legendstrokeWidthproperty. Similar tostrokeDash, the config-levelstrokeWidthproperty is still supported. However, the spec-level property now refers to an input scale, not the legend group boundary. - Breaking Move expression functions and code generation to vega-functions package.
- Breaking: Update data parser to include
loadtransform for dynamic data directly within generated transform pipelines. - Add
fontStyleproperty for chart titles. - Add
labelFontStyleproperty for axes and legends. - Add
titleFontStyleproperty for axes and legends. - Add
labelSeparationproperty for axes and legends. (#1507) - Add
tickMinStepto axis and legend parsers. - Add
titleOrientproperty to configure legend title positioning.- Legal values: `...
v5.0.0-rc5
Changes from v5.0.0-rc4:
docs
- Document layout
titleAnchorproperty.
vega-view-transforms
- Add layout
titleAnchorproperty. (#1664) - Fix grid layout calculation bug.
vega-schema / vega-typings
- Add layout
titleAnchorproperty.
v5.0.0-rc4
Changes from v5.0.0-rc.3:
docs
- Document new View constructor options.
- Document new legend layout options.
vega
- Update layout-splom test spec to include legendAnchor.
- Update legends test spec to include layout options.
- Update scatter-plot test spec to test legend configurations.
- Update test runners to use new View constructor options.
vega-cli
- Update to use new View constructor options.
vega-encode
- Update legend label formats for discrete color gradients.
vega-parser
- Add legend layout config options.
- Add top-level operator to house legend layout config.
- Update config file merging logic.
- Update tests.
vega-scale
- Export d3 tickFormat method.
vega-scenegraph
- Add equals methods to Bounds object.
vega-view
- Add more View constructor options.
vega-view-transforms
- Add configurable layout legend.
- Add anchor support to grid layout.
- Refactor layout code organization.
v5.0.0-rc3
Changes from v5.0.0-rc2:
vega
- Update to use
randomLCGutility from vega-statistics. - Update test scenegraphs to match encoding updates.
vega-cli
- Update to use
randomLCGutility from vega-statistics.
vega-encode
- Fix scale
binsconfiguration to consider raw domain parameter.
vega-functions
- Add
lerpfunction to the expression language.
vega-parser
- Add
titleOrientproperty to configure legend title positioning.- Legal values:
"top"(default),"bottom","left","right"
- Legal values:
- Add
titleAnchorproperty to configure axis and legend title alignment.- Legal values:
"start","middle","end",null(default)
- Legal values:
- Add more stroke dash options for axes and legends.
- Axes:
domainDash,domainDashOffset,gridDashOffset,tickDash,tickDashOffset - Legends:
symbolDash,symbolDashOffset
- Axes:
- Update internal API for more concise, readable spec/config property lookups.
- Update config to set default legend
titleOrientto"top". - Fix axis
titleX/titleYauto-layout bug. - Fix legend
clipHeightbounds flag bug. - Drop unneeded title guide layout logic.
vega-scenegraph
- Update
textmark bounds calc to avoid unnecessary expand.
vega-schema
- Update schema to include new features.
- Update
gradientvalue definition. - Fix missing
strokeWidthentry in valid legend schema definition.
vega-statistics
- Add
randomLCGutility for seeded random number generation.
vega-typings
- Update typings to include schema updates.
vega-util
- Add
lerputility function.
vega-view-transforms
- Update
ViewLayoutto support legendtitleOrientandtitleAnchor. - Update legend bounds calculation.
v5.0.0-rc2
Changes from v5.0.0-rc1:
vega
- Add JSON schema validation test.
- Update test specifications and scenes.
- Drop tv4, use ajv for validation.
- Drop d3-scale-chromatic dependency.
vega-dataflow
- Add support for async callback functions within dataflow evaluation.
- Update runtime, move evaluation logic to internal
evaluatemethod. - Update
runAsyncto queue repeated calls. - Update
runandrunAsyncto accept optionalprerunandpostruncallbacks.
vega-encode
- Add bin boundary generation from
binsparameter object. - Add domain specification using
binsproperty forBinOrdinalscales. - Move interpolation utilities to vega-scale.
- Drop logic for discretized scale lookup.
- Drop
BinOrdinalspecial case for legend label generation, usebinsinstead.
vega-parser
- Add
labelFontStyleproperty for axes and legends. - Add
titleFontStyleproperty for axes and legends. - Add
fontStyleproperty for chart titles. - Update config to use adjusted color scales.
- Fix parsing of scale bin objects.
vega-scale
- Breaking: Remove discrete schemes for continuous data.
- The
schemeDiscretizedmethod has been removed. For interpolating schemes, we now always generate discrete schemes via quantization. - Scheme names such as
blues-7are no longer supported; instead use{"scheme": "blues", "count": 7}.
- The
- Adjust existing color schemes to avoid extreme light / dark colors.
- Add new color schemes:
- Single-hue:
browns,tealblues,teals,warmgreys - Multi-hue:
goldgreen,goldorange,goldred - Density for dark backgrounds:
darkblue,darkgold,darkgreen,darkmulti,darkred - Density for light backgrounds:
lightgreyred,lightgreyteal,lightmulti,lightorange,lighttealblue
- Single-hue:
- Add interpolation utilities:
interpolateColors,quantizeInterpolator - Drop d3-scale-chromatic dependency.
vega-scenegraph
- Add missing scenegraph item properties to vega-scenegraph schema.
- Add JSON schema validation test.
- Update schema to use JSON schema draft 6.
- Update to use
uri-reference, noturi, for image markurl. - Drop tv4, use ajv for validation.
vega-schema
- Add scale
binsobject to schema. - Add new font style properties to schema.
- Update schema to use JSON schema draft 6.
vega-typings
- Update typings to follow schema changes.
- Update tests to follow test specification changes.
vega-view
- Update View methods to use updated async evaluation design.
v5.0.0-rc1
Vega version 5.0.0, release candidate 1!
For a description of updates and a detailed changelog, see #1561
v4.4.0
Changes:
- Add signal
initexpression support. - Add operator
initonlyparameterization. - Add exported
formatreader hash for other projects to extend. - Fix signal lookup for compare. (#1452)
- Fix data format schema.
- Clean up
stacktransform internals. - Update dependencies.
The updated d3-array 2.0 dependency uses ES6 features. Do not directly use Vega v4.4.0 or later if you require strict ES5 compliance. As Vega already requires polyfills for Promise, Symbol, and fetch support, this does not constitute a breaking change.