Skip to content

Releases: vega/vega-lite

v0.8.0 – Migrating to Vega 2

18 Oct 18:41
Compare
Choose a tag to compare

Syntax Change

  • axis
    • only include axis.orient when necessary
  • legends
    • set legend's orient to right by default (similar to Vega)
    • Vega-lite now supports multiple legends
  • filter
    • move filter to data.filter and takes Vega expression as parameter instead of a complicated predicate object.
    • Null filter is added before binning and timeUnit conversion
  • scale
    • scale.reverse is removed as it is redundant with sort.
  • stack
    • add stack control to color and detail encoding
  • sort — now sort property can be either undefined, a String or an Object
    • undefined - the field is unsorted.
    • (as String) 'ascending' or 'descending' – the field is sort by the field's value in ascending or descending order.
    • (as Object — for ordinal/nominal fields only) A sort field object - for sorting the field by an aggregate calculation (sort.op) over a specified sort field (sort.field) in a specified order (sort.order)

Vega 2 Migration Refactor

  • ValueRef
    • replace d.data with datum in filter
    • add datum. option to fieldRef and use it in time transform and template
    • eliminate outdated fieldRef options
    • Replace the eliminated group mark properties with field.group
    • Refer to {group: 'mark.group.width’} with
  • Transforms
    • Aggregation, Bin
    • Stack
      • Use vega2 stack's parameter and rename it to <field_name>_start|end, remove the need to add facet transform before stacking
      • Make facet comes after stack for stacked area chart (This makes stacked area chart looks almost right but still looks weird due to #307 – see example screenshot)
    • Facet
      • use field name reference instead of using keys.0 (#639)
  • Aggregation (#621)
    • avg => mean
    • add all supported aggregation in Vega 2
  • Sorting (#612)
    • remove sort.js and no longer use sort-<field_name> tables as data source
    • modify scale.domain() to include DataRef’s .sort object
    • modify sort property to be consistent with Vega 2 (but still leave it as a top-level vega-lite property)
      • sort.name => sort.field
      • sort.aggregate => sort.op

API Change

  • vl.field => vl.encDef, field.js => encDef.js

Internal Refactor

Variable Name

  • fieldName => field
  • field => encDef

Other

  • update vega dependency in editor and gallery to Vega 2
  • removed _vega2 flag
  • extract filter non-positive value when log are presented from normal filter
  • eliminate encoding.fieldName() and just use encoding.field(...).name
  • only use encDef.name where applicable rather than calling fieldRef
  • local variable refactor in scale.js
  • move stack’s stacked data transform to data.stack
  • add encoding.stack so we do not have to pass stack around
  • remove Encoding.toggleFilterNullO, which should just be a part of vega-lite-ui

Examples

  • added Aggregate Bar Chart, Stacked bar chart, Trellis Stacked Bar Chart
  • both vl input and vg output are validated in the gallery and editor

v0.7.18

09 Oct 18:28
Compare
Choose a tag to compare
Release v0.7.18.

Release v0.7.13

11 Aug 03:40
Compare
Choose a tag to compare
Release v0.7.13.

v0.7.1

25 May 18:19
Compare
Choose a tag to compare
  • change .aggr => .aggregate, .enc=>.encoding
  • add N (nominal) data type
  • add more color palette options
    • use color brewer scale or interpolate color for O
    • use categorical color scale for N