Skip to content

v0.9.0

Compare
Choose a tag to compare
@kanitw kanitw released this 04 Dec 20:51
· 7578 commits to master since this release

We refactored a number of syntax decisions in this PR as we are moving closer to 1.0. Please read carefully to make sure that you migrate correctly.

Main APIs

  • vl.compile's signature has changed
    • It no longer requires stats
    • It returns an object with property spec contains the vega spec. (We will add warning / errors as additional properties in the future.)

Syntax

  • CORE SYNTAX CHANGES
    • Rename marktype to mark
    • Rename name to field in each field definition
    • Rename col to column for clarity
    • Replace short name type with full name type by default e.g., Q => quantitative, O => ordinal, T => temporal, N=> nominal. But short name types are still supported and the type property is now case insensitive.
  • Added vega's scale, axis, and legend properties that should be supported #181
  • Added scale property to row, column and shape
  • rename / refactor
    • axis.maxLabelLength => axis.labelMaxLength
    • scale.bandSize => scale.bandWidth
    • Move encDef.band to be a part of scale
      • band.size => scale.bandWidth
      • band.padding => scale.padding
  • revise useRawDomain to support only aggregate functions that produces values ranging in the domain of the source data ('mean', 'average', 'stdev', 'stdevp', 'median', 'q1', 'q3', 'min', 'max’)
  • revised config
    • remove unused config.gridColor, config.gridOpacity
    • remove config.bandWidth, config.padding and config.useRawDomain as it is redundant with scale.bandWidth and scale.padding, scale.useRawDomain in field definitions
      • set default values of scale.bandWidth, scale.padding just for X, Y
    • group configs of a particular element together
      • config.cell
        • move cell configs to be under cell: width, height, padding, gridColor, gridOpacity, gridOffset
          • remove config.singleWidth, config.singleHeight, encoding.column.width, encoding.row.height and simply always use value from cell.width, cell.height
        • add the following group marks properties to config.cell: fill, fillOpacity, stroke, strokeWidth, strokeOpacity, strokeDash, strokeDashOffset`
        • added missing properties
      • config.marks
        • move baseline, font, fontStyle, fontWeight from encoding.text to config.marks
        • encoding.shape.filled => config.marks.filled
        • encoding.color.opacity => config.marks.opacity
        • move all text properties from encoding.text to config.marks except renaming encoding.text.placeholder to encoding.text.value
        • config.strokeWidth => config.marks.strokeWidth
        • added missing properties

Output

  • data
    • rename Vega’s data tables: raw => source and aggregate => summary
    • added layout table for layout calculation and add root marks group for binding layout data
  • output now describe properties in update rather than enter
  • only produces scales, axes, legends when they are non-empty
  • removed axis grid for row and column and added rule marks (row|column-rules) instead for drawing rules/grid between rows / columns
  • {field: {group: 'width|height'}} are used where necessary
  • removed scales for timeUnit and used template instead
  • revised default values
    • scale's nice, points and zero
    • set axis's layer: 'back' only if grid is true - fixes #526
    • complex rules for determining opacity and color scales removed.
    • stack's default order is revised
    • simplified rules for automatic opacity

Helper APIs

  • move requiredEncodings and supportedEncodings to vl.validate
  • add vl.validate.getEncodingMappingError() -- this is subject to change.
  • Include Vega-Lite version in the compiled files. (vl.version)
  • add encoding.padding() helper
  • Add separate methods for properties in scale, axis, and legend
  • rename
    • vl.encDef => vl.fieldDef
    • vl.enc => vl.encoding
    • vl.Encoding => vl.spec for static methods
    • vl.Encoding => vl.compiler.model for internal model for the compiler
    • scale.sort() => scale.domain.sort()
    • vl.schema.encTypes => vl.const.Enctype.LIST
    • general utility methods are now moved to vl.util
  • Add namespaces for helpers and constants vl.type, vl.channel, vl.bin, vl.aggregate, vl.timeunit
  • move shorthand methods to vl.shorthand
  • fixed bug when having array in the schema for schemautil.subtract

Internal

  • Migrated to Typescript & add interfaces for all type
  • Break schema into multiple files
  • Vega-Lite editor removed, as Vega Editor now supports Vega-Lite