Skip to content

2.4.0

Compare
Choose a tag to compare
@gampleman gampleman released this 06 Oct 12:57
· 14 commits to master since this release
c04053b

Hierarchy

A new module which provides various layout algorithms for dealing with tree-like data structures.

Detail of tree diagram

We provide a "tidy" algorithm for doing classical node-link diagrams, which supports both a typical layered approach where each level of children are laid out on a separate layer, as well as the more space efficient non-layered option:

Layered vs non-layered layout

Apart from that, we also provide a classical treemap layout, with several different partitioning algorithms (and as usual, you can bring your own partitioning algorithm):

Treemap

Finally, we also ship a partition layout, that can be used for various forms of layout, for instance a nice interactive sunburst chart:

Sunburst demo

This functionality is powered by the brand new gampleman/elm-rosetree library, that is now a dependency.

Shape.bumpX and Shape.bumpY

We added two new curve types that are particularly handy for generating those nice curved connectors for vertical and horizontal tree layouts.

Interpolation and Animation Improvements

Interpolation gets a nice Interpolation.pointAlongPath function that allows interpolating a ( Float, Float ) position based on an arbitrary path. This can quickly lead to some very neat animations.

Staggering multiple animations has also been a feature we've long wanted to add. Interpolation now has a relatively abstract Interpolation.staggeredWithParallelism which staggers animations based on how many (on average, as there is a ramp up and ramp down period) you want to run at the same time. Perhaps more intuitive to traditional animation approaches is Transition.staggered which offers less abstract control based on duration for each animation and delay till the next one starts in actual milliseconds, as well as adding easing to each animation separately.

Transitions now have a concept of repetition, where animations can repeat either from the beginning or alternate running back-to-front.

Documentation

First and foremost, we now have an official elm-visualization tutorial: elm-visualization - An introduction. This should be a handy resource for getting started with the library, since it presents the concepts in an order of importance to day-to-day tasks and skips over some of the more complex options, focusing on some of the most important daily drivers.

Apart from the examples featured above, we now have two new examples that among other things showcase some techniques for label placement:

Weather Radial

and

Screenshot 2023-10-05 at 14 21 53

Bugfixes

This release fixes a bug in Force that caused division by zero errors when two entities occupied the exact same point. The algorithm will now move one of them a minuscule amount in an arbitrary direction before continuing the computation (since we expect the forces will move the entities a much larger amount, this should not cause any noticeable trouble).

Project improvements

The project has upgraded elm-test to v2, migrated to GitHub actions, and started using elm-review. This makes it easier to contribute as much of the code quality process is now automated.

Acknowledgments

Many thanks to @FuJa0815 and @lucamug for fixing typos in the docs this release.