Releases: vega/vega-lite
Releases · vega/vega-lite
v1.0.10
v1.0.9
Features
- Add new
opacity
channel #1336 – Thanks @YuhanLu - Additional axis and legend properties #1290, #1302 – Thanks @YuhanLu
Fixes
- Fix broken legend stroke color #1203
- Fix bug tick orient inverted #1348
- Disable default strokeDash for legend #1344
- Make CellConfig.strokeDash an array #1313 – Thanks @mprudhom
- Add
tickSizeRange
#1299 – Thanks @mprudhom - Make
size
channel stackable #1312 - Read bandSize config if the scale does not exist #1286
- Axis and legend properties should not be set if empty – Fix #1221 #1223
Internal
- Refactor internal compile to treat facet as a compositional operator in preparation for other composition support
- Export timeunit.format() for VgTooltip #1240
- Export config #1227 – Thanks @mprudhom
Docs
- Table of Content – Thanks @willium
Examples
bubble_health_income
github_punchcard
trellis_anscombe
– Thanks @mcorrell
Experimental
Layer
operator for creating layered charts.
v1.0.8
Syntax
- Support
yearmonthdayhoursminutesseconds
Fixes
- Fix
vl2png
andvl2svg
– Thanks @sampsyo - Correct
strokeDashOffset
schema – Thanks @mprudhom - Ensure that all output are valid Vega specifications based on Vega Schema – Thanks @mprudhom
Internal
- Move interfaces from
src/schema
tosrc/
- Move all
compile/mark-*.ts
tocompile/mark/*.ts
v0.9.3
Syntax
- Scale
- remove scale and sort from detail and make sure there is no scale for detail in the output
- remove
points
from ordinal scale #924
- Axis
- Add axis properties:
labels
,tickSizeMajor
,tickSizeMinor
,tickSizeEnd
,values
- rename
shortTimeName
=>shortTimeLabel
- allow hiding
axis
by settingaxis
tofalse
- Add axis properties:
- Mark
- revised rules for
bar
andarea
- revised rules for
- Channel
- add
path
channel forline
and removeconfig.sortLineBy
- support multiple
detail
fields (as array) #904 -
- add
- Time Unit
- Adds additional time units such as
yearmonth
,yearmonthday
,hoursminutes
, ... - Allow customization of time format.
- Adds additional time units such as
- Config
- add
config.scene
- make
config.nullFilter
a boolean property config.mark
- Support
config.stack.offset
=’normalize
- Add properties for hiding facet’s grid and docs for all
cell.grid
properties
- add
API
- Change the main file to
vl.js
instead of the compiled file. vl.schema.util.merge
=>vl.schema.util.mergeDeep
Output
- Data
- Rename
STACKED
toSTACKED_SCALE
to avoid confusion since the data source sums data for scale while the actual stack layout is applied inline. - Remove the unnecessary max calculation in STACKED_SCALE since scale would automatically calculate max anyway.
- Rename
- Faceting
- Replace
facet
transform withaggregate
transform for axes group - Apply
axis.grid
ofrow
andcolumn
to our customized grid built by a rule mark group instead of passing it to the row’s scale. Also remove the redundantconfig.cell.gridShow
. Fixes #943 - Apply
scale.padding
ofrow
andcolumn
to our cell padding layout calculation & remove the redundantconfig.cell.padding
. Fixes #917 - Set ROW and COLUMN’s padding to 0 if Y and X are not mapped respectively. Fixes #822
- Replace
- Time Unit
- Use timestamps internally for temporal data even if the data is being aggregated.
- When time unit is
month
,day
,hours
,minutes
, orseconds
, vl automatically adds missing points to the domain. Previously the domain was set directly. Now, vl creates a new data source.
- Optimize order of Vega output (make sure that
from
comes beforeproperties
) - Add
spec.name
as prefix to mark group and scale’s name - Auto drop unsupported channel from the output spec
- Make bin_range for bin_scale #879
- Determine date, year, second, minute's scale type based on mark type and orientation.
(For dimension channel of bar or tick mark, use ordinal scale. Otherwise, use linear scale.) #912 - Add offset for vertical dot plot with tick
- Use
xc
andyc
for ticks so we don’t have to add offset
Bug Fixes
- Ensure that
transform
in axes group are arrays + refactor - Support stacked charts with both detail and color #878
- Correctly calculate total width/height and offset for trellis plot #880
- Fix broken legend color + add stroke transparent #916
- Apply mark config to legend as well #913
- Make
size.value
works withtick
andbar
mark – fixes #931 - avoid outputting both
bandWidth
andrange
#953
v0.9.2
v0.9.1
Syntax
- bin
- Support more
bin
properties
- Support more
Output
- Fix layout bug for bin and time unit
Internal
- update + remove outdated dependencies
- update build scripts
- add utility methods
bin/vl2png
,bin/vl2svg
and methods for producing image from vega-lite specnpm run x-compile
andnpm run x-diff
for visual test
v0.9.0
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.)
- It no longer requires
Syntax
- CORE SYNTAX CHANGES
- Rename
marktype
tomark
- Rename
name
tofield
in each field definition - Rename
col
tocolumn
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 thetype
property is now case insensitive.
- Rename
- Added vega's scale, axis, and legend properties that should be supported #181
- Added scale property to
row
,column
andshape
- rename / refactor
axis.maxLabelLength
=>axis.labelMaxLength
scale.bandSize
=>scale.bandWidth
- Move
encDef.band
to be a part ofscale
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
andconfig.useRawDomain
as it is redundant withscale.bandWidth
andscale.padding
,scale.useRawDomain
in field definitions- set default values of
scale.bandWidth
,scale.padding
just for X, Y
- set default values of
- group configs of a particular element together
config.cell
- move
cell
configs to be undercell
:width
,height
,padding
,gridColor
,gridOpacity
,gridOffset
- remove
config.singleWidth
,config.singleHeight
,encoding.column.width
,encoding.row.height
and simply always use value fromcell.width
,cell.height
- remove
- add the following group marks properties to
config.cell
:fill
,fillOpacity
,stroke
,strokeWidth
,strokeOpacity
, strokeDash, strokeDashOffset` - added missing properties
- move
config.marks
- move
baseline
,font
,fontStyle
,fontWeight
fromencoding.text
toconfig.marks
encoding.shape.filled
=>config.marks.filled
encoding.color.opacity
=>config.marks.opacity
- move all text properties from
encoding.text
toconfig.marks
except renamingencoding.text.placeholder
toencoding.text.value
config.strokeWidth
=>config.marks.strokeWidth
- added missing properties
- move
- remove unused
Output
- data
- rename Vega’s
data
tables:raw
=>source
andaggregate
=>summary
- added
layout
table for layout calculation and addroot
marks group for bindinglayout
data
- rename Vega’s
- output now describe properties in
update
rather thanenter
- only produces
scales
,axes
,legends
when they are non-empty - removed axis grid for
row
andcolumn
and addedrule
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
andzero
- set axis's
layer: 'back'
only ifgrid
istrue
- fixes #526 - complex rules for determining opacity and color scales removed.
- stack's default order is revised
- simplified rules for automatic opacity
- scale's
Helper APIs
- move
requiredEncodings
andsupportedEncodings
tovl.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 methodsvl.Encoding
=>vl.compiler.model
for internal model for the compilerscale.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
v0.8.3
- Change default value for
axis.grid
for binned field tofalse
- Reimplement bin's scale using linear scale instead (#693)
- Fix missing value problem in stacked area chart using the new Vega's
impute
transform - Remove
sort
transform from output stacked area chart spec asstack
transform already includedsortby