Releases: vega/vega-lite
v2.0.0-alpha.6
- We now support
"aggregate": "count"
without"field": "*"
(See example specification changes in #2020) - Better scales for binned fields (using Vega's new
bin-linear
andbin-ordinal
scales).
v2.0.0-alpha.5
- Add warning when using fieldDef with incompatible channel
v2.0.0-alpha.4 – Improved Release Output
We now ship both ts and js files to npm packages.
All compiled js files, both bundled (vega-lite.js
and vega-lite.min.js
) and TS compiler's output, are under build/
.
If you wish to do local import of a particular file, please import from build/src
from dependent projects (both JS and TS).
For example, to import Channel
, you can import like this (diff showing traditional import)
+import {Channel} from 'vega-lite/build/src/channel';
-import {Channel} from 'vega-lite/src/channel';
For dependent TS projects, this approach has multiple benefits:
-
Users can do
npm link vega-lite
in a dependent project. TS compiler will no longer import TS files rather than JS files from linked project. (.ts
files have high precendence than.js
files.) -
Source map will still work when users try to debug lines in Vega-Lite.
v2.0.0-alpha.3 – Interaction Support in Unit Specifications & Config Revision
Breaking Syntax Revision
Revise Axis/Legend Config to match Vega 3 and leverage config parser in Vega 3's parser.
Axis
- Rename
axisWidth
todomainWidth
,axisColor
todomainColor
,tickLabelColor
tolabelColor
,tickLabelFont
tolabelFont
,tickLabelFontSize
tolabelFontSize
,tickPadding
tolabelPadding
,titleOffset
totitlePadding
- Separate Axis from AxisConfig. Make these properties only available as
Axis
properties:domain
,grid
,labels
,labelMaxLength
,labelPadding
,maxExtent
,minExtent
,offset
,position
,shortTimeLabels
,ticks
,tickCount
,tickSize
,titleMaxLength
,titlePadding
,zindex
- Remove
labelAlign
,labelBaseline
,subdivide
,tickSizeMajor
,tickSizeMinor
,tickSizeEnd
from Axis Config
Legend
- Add
symbolType
- Remove
margin
,symbolShape
from Legend Config - Separate Legend from LegendConfig. Make these properties only available as Legend properties:
entryPadding
,orient
,offset
,padding
,tickCount
,zindex
- Remove related code for Vega Legend configs
Scale
- Range config for scale are now available inside
config.scale.*
(e.g.,config.scale.minSize
,config.scale.shapes
)
Extend Mark Syntax
- Make mark property can be either a mark type or (new) a mark definition object
- Separate CompositeMark such as
"error-bar"
from (primitive) Mark …- Provide API for registering new type of compositeMark
Interaction Syntax
Initial support for specifying interactive behaviours within unit specifications. Four example specifications demonstrate interactive brushing, highlighting, panning & zooming, and dynamic query widgets.
The syntax for interactive selections has subtly changed from our earlier research paper. Complete documentation is forthcoming but, in the interim, please consult these four comments that briefly describe the space of selection specifications currently supported.
Note: We plan to make another release very soon this week that will move all compiled files to build/
folder.
v2.0.0-alpha.2
Syntax
Mark
- Rename
"errorBar"
=>"error-bar"
for consistency with other properties. - Separate CompositeMark from (primitive) Mark …
- Provide API for registering new type of composite marks with a normalizer method
Encoding
- Add
stack
tox
andy
encoding channel - Add
format
fortext
encoding channel + removeconfig.text.format
Scale / Axis / Legend
- Add new axis properties:
labelPadding
,position
,titlePadding
,maxExtent
,minExtent
- Add new legend properties:
entryPadding
,tickCount
,zindex
,titlePadding
- Add new scale properties:
interpolate
Other Config
- Rename
config.mark.stacked
toconfig.stack
- Add scale range config to match Vega config
- Remove
config.text.applyColorToBackground
, which adds background to text mark.
Composition
- Make layer operator singular (
layer
), not plural (layers
) -- to be consistent withfacet
,repeat
, andconcat
.
Output
- Add mark role to the output so that we can leverage Vega mark's role config for Vega-Lite marks that are not Vega marks (
bar
,tick
,point
,circle
,square
)
Internal
- Distinguish between
Extended*Spec
and*Spec
, which both implementGeneric*Spec
, and betweenMark
andCompositeMark
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