Releases: vega/vega-lite
Releases · vega/vega-lite
v2.0.0-alpha.1
Syntax Change
- Update Axis's
tick
andlabel
toticks
andlabels
(to match Vega-v3.0.0
Bug Fix
- Correct
scaleTypeSupportProperty
:log
scale supportsexponent
too
Internal
- Refactor
src/compile/scale.type
to take more simpler input to facilitate CompassQL upgrade to VL 2 alpha
v2.0.0-alpha.0
This first alpha release supports all features from Vega-Lite 1, but renders charts using Vega 3 instead of Vega 2. Since this is a pre-release, we will further revise syntax (schema) of the language and likely introduce some breaking changes prior to the official 2.0 release.
Syntax Change
Marks
- Add
rect
mark for creating arbitraryrect
and for creating table heat map - Most mark types (except
rect
) can now be stacked. (For example,point
s can be stacked to serve as markers forline
andarea
.)
Channels
- Remove
path
channel and useorder
channel for sorting line orders instead. - The
order
channel no longer affects layer order for marks.
Transform
- Similar to Vega 3, formula definition for
calculate
now useas
property to specify output fields name instead offield
.
Scale
Scale Type
- Scale types are updated to match Vega 3 and D3 4.0.
- Ordinal scale type is now replaced with the new
ordinal
(for lookup table),point
, andband
scales. - A new
sequential
scale for color is added for mapping continuous data to a sequential color scheme.
- Ordinal scale type is now replaced with the new
Scale Padding
- Facet (
row
andcolumn
)'s scale renamed tospacing
as it represents pixel spacing/padding between different faceted cell/plot whilepadding
is a padding ratio between[0, 1]
for other channels padding
now has no effect onrow
andcolumn
whilespacing
has no effect on other channels besidesrow
andcolumn
.paddingOuter
andpaddingInner
added.
Other Scale Properties
- Similar to Vega 3,
"bandSize"
is now renamed to"rangeStep"
"rangeStep": null
now makesrangeStep
fits the width or height. The original value"fit"
for"rangeStep"
(formerly"bandSize"
) is removed.config.scale.round
is now only supported forx
,y
,row
,column
(and ignored for other channels).scale
'szero
is nowtrue
by default when using aquantitative
field withsize
.- A new
scheme
property is added for specifying scheme as scale range
Sort
"sort": "none"
is no longer supported. Instead, please use"sort": null
.
Axis
tick
anddomain
properties added for enabling / disabling parts of an axis.ticks
renamed totickCount
characterWidth
removed.- Axis now no longer has
layer
property. Instead, there is a "zindex" property (default 0). By default, axes should be drawn behind all chart elements. To put them in front, use "zindex": 1.
Axis / legend
properties
directive for custom axis and legend style are removed. Instead please use theencode
directive.
Config
- Add mark specific config for all marks. Basically, each mark config (e.g.,
config.bar.*
) has all properties similar to mark config. This way you can make line's default color be green while bar's default is blue if desired. - Remove old mark specific config from
config.mark
config.mark.barBinSpacing/barThinSize/barSize
=>config.bar.binSpacing/continuousBandSize/discreteBandSize
config.mark.lineSize
=>config.line.strokeWidth
config.mark.shape
=>config.point.shape
config.mark.size
=>config.point/circle/square.size
config.mark.ruleSize
=>config.rule.strokeWidth
config.mark.tickSize,tickThickness
=>config.tick.bandSize/thickness
config.mark.*
(text properties) =>config.text.*
- Move each scale range config from
config.scale
toconfig.mark
to map with default non-mapped property value. For example:config.scale.opacityRange
=>config.mark.min/maxOpacity
(as a companion toconfig.mark.opacity
)config.scale.barSizeRange
=>config.bar.min/maxBandSize
(as a companion toconfig.bar.bandSize
)config.scale.shapeRange
=>config.point.shapes
(as a companion toconfig.point.shape
)
API
- Now
vl.compile
takes logger that implementsLoggerInterface
as input, allow redirecting warning, info, and debug log to other locations besides the console. - More warnings:
- If a scale type does not support any specified scale properties
Output
- Include vega's
$schema
in the output
Internal
v1.3.1
v1.3.0
- Add example for diverging color scale (#1591)
- Make setting
axis
orlegend
=null
as the default way to disable them. - Fix
Axis.titleColor/legend.labelColor/legend.titleColor
to affect the corresponding text'sfill
instead ofstroke
- Enable declaration files
.d.ts
emit – thanks @weswigham
This is probably our last MINOR release as we are now working on Vega-Lite 2.0.
v1.2.1
Syntax
- Add DateTime support for
scale.domain
andvalues
ofaxis
andlegend
#1577 - Annotate DateTime schema with min and max values
Bug Fixes
- Apply format to bin range as well. Fix #1112
- Only use
d
ascount
format for text channel - Disable useRawDomain for log scale
- Correct merge
facet.cell.width
,facet.cell.height
- Fix #1248
-tickLabelColor
should compile intofill
instead ofstroke
- Fix #1561 - Don't start bar and area from zero for time/utc scales - Fix #1549
- Include width and height in child spec of a normalized faceted spec
- Add
month-date
timeUnit - Correct quarter's domain to produce correct month - Fix #1531, #1532
- Fix incorrect layout source and values for the root group. - Fix #1540
- Change default timeFormat for temporal field to "Jan 1, 2017" rather than "2017-01-01"
- Correct orient for vertical tick with bin - Fix #1536
- Correct orient for temporal dimension without timeUnit
- Make filterInvalid read from parent to make sure that we always correctly filter invalid values.
- Disable stack when (1) the aggregated axis is a non-linear scale or (2) the aggregation op is non-summative
- Use opacity = 0.7 for unstacked bar with color/detail/size
- Basic
format.parse
property support - Automatically infer format.parse for filtered field in filter definition object
v1.2.0 Top-level Width & Height, Ordinal Fit Scale, and Spaces in Field Names
Syntax
- Support Top-level Width & Height, Ordinal Fit Scale
- Add top-level
width
andheight
. - Support
scale.bandSize
="fit"
- Make
padding
only for band ordinal scale (whenbandSize
="fit"
) - [See Documentation here](
- Add top-level
- Fix bugs in
filterInvalid
- Only add
NaN
filter for quantitative and temporal fields - Don't add filters for
*
(of count fields)
- Only add
- Support custom shapes -- Thanks @mprudhom
- Rename
in
operator in filter tooneOf
to avoid using restrict names in other languages ("in" is still supported, but now deprecated from the JSON schema.)
Examples
- Correct File Extensions to
.vl.json
, which is the new standard file extension.
Builds
- Extract
.js.map
fiels from.js
.
Fixes
- Support Spaces in Field Names
- Fix bar/area for
log
scale and scale withzero = false
- Don't override shape/size symbol for shape/size legend
- Correctly sort line chart when the dimension axis has sort property
- Fix incorrect orientation for tick in dot-plot with continuous timeUnit
Internal API
- Remove unused
transpose
method inspec.ts
v1.1.3 Allow spaces and dashes in field names
v1.1.2
v1.1.1
v1.1.0 Filter Definition Object
Syntax Change
- Introducing
filter
objects withequal
,range
andin
operators with support for filtering time units (For more information, please see transform.md) - Rename
transform
'sfilterNull
tofilterInvalid
since we also filter NaN values (#1475)filterNull
is still supported for backward compatibility but is no longer included in the JSON schema.
- cleanup mistakes in
timeUnit
schema- Correct
yearmonthday
toyearmonthdate
in the schema - Remove
YEARMONTHDAY
,YEARDATE
andYEARDAY
time units as the output from transformation are not temporal values anymore, which violate temporal type semantic. If you really need these transformation, please usetransform.calculate
to manually derive these fields.
- Correct
Fixes
- Correctly implement log scale with bar (#1368)
- Always fill symbol with transparent fill (#1316)
- Do not set zero=true by default if user provides a custom scale domain (#1329)
- Make legend support opacity channel (#1375)
Internal
- Extract vl.timeUnit.defaultScaleType
- Refactor
vl.timeUnit.expression
- rename
expression
tofieldExpr
- take
field
as input instead
- rename
- Refactor
vl.timeUnit.TIMEUNITS
- reorder vl.timeUnit.TIMEUNITS array to group by semantic
- Add
SINGLE_TIMEUNITS
andMULTI_TIMEUNITS
andisSingleTimeUnit
andisMultiTimeUnit
methods