Releases: gicentre/elm-vega
2.3.0
While technically a 'minor change' (package remains backwardly compatible with previous 2.x releases), there are some significant changes in the recommended use of this package in preparation for future releases and incorporation of full Vega specifications.
Additions (reflecting additions to Vega-Lite 2.4)
- New
trail
mark for variable width line features. SeevlTests/trailTests.elm
for examples. - New Point marker property for symbolising vertices on top of line and area marks. See new examples in
vlTestGallery
- A new window transform allows running aggregates, ranking etc. See
vlTests/windowTransformTests.elm
for examples. - Custom sort order can now be specified as an explicit array of values.
- Bin spacing can be set for bar marks.
- Tooltips can now have multiple values with the new
tooltips
function.
Changes:
Significant change: Although using type constructors to build a specification (e.g. PName "Horsepower, PmType Quantitative
) is still possible, every parameterised type constructor now has an equivalent function (e.g pName "Horsepower", pMType Quantitative
). It is strongly recommended that you convert specifications to use these new functions as their type constructor equivalents have been deprecated.
In practice, although widespread throughout a specification, this is quite straightforward and generally involves just replacing the uppercase first letter of a type constructor with its lowercase equivalent. In some cases there are some minor variations of this naming rule in order to produce more consistently named functions. Some examples:
Old approach (type constructor) | New approach (function) |
---|---|
PName |
pName |
MName |
mName |
PmType |
pMType |
MmType |
mMType |
mark Circle [] |
circle [] |
mark Bar [] |
bar [] |
mark Text [] |
textMark [] |
Strings ["a", "b", "c"] |
strs ["a", "b", "c"] |
Numbers [1, 2, 3] |
nums [1, 2, 3] |
Booleans [True, False, False] |
boos [True, False, False] |
configuration (Axis [ DomainWidth 1 ]) |
configuration (coAxis [ axcoDomainWidth 1 ]) |
configuration (View [ Stroke Nothing ]) |
configuration (coView [ vicoStroke Nothing ]) |
Elm's error reporting, type checker along with the examples and API documentation should assist in using the new style. Using the old style will continue to work, but will not be supported in future major releases.
Refactors:
- Much internal refactoring to use function-based approach to specification.
Misc:
- API documentation improvements that reflect new function-based approach to specification with much new detail added.
- Additional tests
2.2.1
2.2.0
2.1.0
Largely changes to reflect latest additions to Vega-Lite 2.3
Additions:
- New fill and stroke channels
- Top level datasets function for collections of named data sources
- Ability to remove scales by providing empty list.
- Exposed LabelledSpec to assist in parameterising elm-vega function calls
Changes:
- dataFromJson no longer places spec inside singleton array
Refactors:
- Uses Vega-Lite 2.3's
Longutide
andLatitude
geographic position channels (no need for API change in elm-vega as these were already modelled)
Misc:
- Additional tests
- Simplified many examples to take advantage of shared projection and encoding
- Minor API documentation improvements