Skip to content

v2.0.0-alpha.9

Pre-release
Pre-release
Compare
Choose a tag to compare
@kanitw kanitw released this 15 Apr 18:47
· 5259 commits to master since this release

Syntax Changes

Top-Level Properties

Now top-level properties such as padding, $schema, config. etc. can only be specified at the top-level of a specification.

  • Remove a defunct top-level property viewport as it no longer exists in Vega 3

Transform

transform is now an array of different transform objects so the order of the transforms becomes clear.
Currently we support two types of transform objects

  1. Filter transform, which has a "filter" property describing (1) a Filter Definition Object (2) an array of Filter Definition Objects or (3) a Vega expression defining the filter.
  2. Calculate transform, which has two properties: (1) calculate defining a Vega Expression of the formula to be calculated and 2) as defining the calculated field name.

The follow diff shows an example changed in a specification.

- "transform": {		 
-    "filter": "datum.year == 2000",		 
-    "calculate": [{"as": "gender", "expr": "datum.sex == 2 ? \"Female\" : \"Male\""}]
-  }, 		  
+  "transform": [
+    {"filter": "datum.year == 2000"},
+    {"calculate": "datum.sex == 2 ? \"Female\" : \"Male\"", "as": "gender"}
+  ],

Bin

Removed config.maxbins and make the default depend on the channel. You can still override the maximum number of bins for each encoding.

Filled

Support filled in mark definitions (#2083).

Others

  • Fix the bug that labelAngle cannot be applied when labelAngle == 0 (#1664)
  • Major internal improvements with a new dataflow (#2086)