Skip to content

@jheer jheer released this Mar 6, 2020 · 57 commits to master since this release

Notable Additions

  • The Vega parser now generates a built-in background signal which the view uses to set the background color. While not technically a breaking change (specs will still parse and evaluate successfully), existing specs that use a signal named "background" may not render the same as before, in which case a different signal name should be used.
  • Top-level properties (autosize, background, padding, width, height) accept signal references, such as {"signal": "<expr>"}, which map to a signal definition's update property. If the top-level signals array contains an entry that matches one of these properties, the definitions will be merged, with precedence given to the properties defined in the signals array.
  • Vega views now include ARIA attributes on the view container DOM element. The role attribute is set to "figure", and the aria-label attribute is set to the specification description property.
  • The aggregate and window transforms support the product operation to multiply values.
  • The config supports a top-level lineBreak option for setting a global default for text line breaks. This property should be a string or regexp value, or a corresponding signal reference.
  • Support for text baseline values line-top and line-bottom. These values are similar to top and bottom baselines, but calculated relative to the lineHeight rather than fontSize alone.
  • Support for color blend modes via the new blend encoding channel. The allowed values are: multiply, screen, overlay, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, exclusion, hue, saturation, color, luminosity. For Canvas rendering, the blend is set via the context 2D globalCompositeOperation property. For SVG rendering, the blend is set via the CSS mix-blend-mode style. The default Vega value is null (or undefined), which maps to the default values "source-over" (for Canvas) and "normal" (for SVG). For more, see the Canvas globalCompositeOperation and CSS mix-blend-mode documentation, including limitations in cross-browser support.
  • Support for configuration of cross-origin image handling. Vega uses crossOrigin="anonymous" by default for loaded images, which allows images loaded from a different host to be included in exported visualization images (and thereby avoid "tainted canvas errors"), so long as the server provides permission via proper CORS headers. This default can be overridden by providing loader options to the Vega view that include a crossOrigin property. If this property is defined and maps to a value of null or undefined, then a no-cors fetch will be performed instead.
  • Add axis labelOffset property to adjust axis label position in addition to tickOffset, and labelLineHeight to set the line height for multi-line axis labels.

Changelog

Changes from v5.9.2:

docs

  • Add description entries to all specifications in the example gallery.
  • Update documentation for all new features.

vega

  • Update test specifications to avoid use of signals named "background".

vega-loader

  • Add crossOrigin URI sanitization configuration for images. (#2238)

vega-parser

  • Add built-in background signal to drive view background.
  • Add support for top-level properties to take signal-values.
  • Add application of lineBreak config option to text marks. (#2370)
  • Add axis labelOffset property. (thanks @kanitw! #2317)
  • Add axis labelLineHeight property. (thanks @kanitw! #2437)
  • Add description support to parser output and config.

vega-scenegraph

  • Add crossOrigin image handling support. (#2238)
  • Add blend encoding channel support. (#2311)
  • Add line-top, line-bottom text baseline options. (#2395)
  • Add text trimming to ensure consistent output. (#2418)
  • Fix linear gradient to use normalized bounding box coordinates. (#2365)
  • Fix canvas damage/redraw: Align to base pixel grid in case of non-integer scaling. (#2425)

vega-schema

  • Add blend encoding to schema.
  • Add line-top, line-bottom text baseline options. (#2395)
  • Add top-level signal-valued properties to schema.
  • Add axis labelOffset and labelLineHeight properties to schema.

vega-transforms

  • Add product aggregate operation. (#2307)

vega-typings

  • Add blend encoding to typings.
  • Add line-top, line-bottom text baseline options. (#2395)
  • Add top-level signal-valued properties to typings.
  • Add lineBreak config typing. (#2370)
  • Add axis labelOffset and labelLineHeight typings.

vega-util

  • Fix prototype pollution vulnerability.

vega-view

  • Add ARIA attributes and View description method.
  • Use background signal to control the view background color.
  • Update padding method to handle numeric values.

vega-view-transforms

  • Fix axis title layout bounds to avoid improper padding offset. (#2368)
  • Fix view layout resize code to avoid invocation of padding until needed.
Assets 2
You can’t perform that action at this time.