Releases: StatistikStadtZuerich/sszvis
v3.1.1
v3.1.1 (2024-11-06)
What's Changed
docs: 🗒️ improve data structure sections by @lloydrichards in #29
- fix the selection of the
sszvis.nestedStackedBarsVertical
to render first time - updated documentation on data structure to match new
d3.stack
and include examples
Full Changelog: v3.1.0...v3.1.1
v3.1.0
v3.1.0 (2024-10-24)
What's Changed
feat: ✨ add nestedStackedBarsVertical and confarea by @lloydrichards in #28
- added
sszvis.nestedStackedBarsVertical
component - added
sszvis.annotationConfidenceArea
component - added
sszvis.rulerLabelVerticalSeparate
function - improved performance by changing the
.enter().exit()
pattern to.join()
- fixes to documentation and examples to improve clarity
Full Changelog: v3.0.5...v3.1.0
v3.0.5
v3.0.5 (2024-09-25)
- fix path removal when merging
- fix interactions in documentation examples
Full Changelog: v3.0.4...v3.0.5
v3.0.4
3.0.4 (2024-08-30)
- fix custom event handling in
sszvis.behavior.move
to match d3 v7 - fix selectMenu to pass same
onChange
event as buttonGroup
Full Changelog: v3.0.3...v3.0.4
v3.0.3
3.0.3 (2024-08-15)
- correctly defined values using isNaN
- fix dy calculation in rulers
Full Changelog: v3.0.2...v3.0.3
v3.0.1
v3.0.0
What's Changed
- Upgraded d3 v5 to v7 (BREAKING CHANGE) by @lloydrichards in #20
- Remove polyfills for EI (BREAKING CHANGE) by @lloydrichards in #26
- Update code examples to use modern ES6 features by @lloydrichards in #27
The sszvis
library now is dependent on d3
version 7 (see d3 v6 migration guide). This means you will need to upgrade any scripts that import v5 to v7.
<script src="https://unpkg.com/d3@7/dist/d3.min.js"></script>
The upgrade to d3 v7 comes with a few breaking changes. The most notable one is the usage of newer ES6 data structures like Map
and Set
instead of the old d3.map
and d3.value
based data structures. This change was necessary to improve performance and to align with modern JavaScript practices.
// This d3 v5 code snippet should be updated to ...
state.maxStacked = d3.max(d3.values(dateValues), function (s) {...});
// ... this d3 v7 code snippet
state.maxStacked = d3.max(Object.values(dateValues), (s) => {...});
The other major change is that to mouse event handlers which are now the first argument in the callback for any event listeners. This change causes any existing code that uses interactions (hover, mouse clicks etc) to break.
// This d3 v5 code snippet should be updated to ...
toggleMultiples: function (g) {
state.isMultiples = g === "Separiert";
render(state);
},
// ... this d3 v7 code snippet
toggleMultiples: (e, g) => {
state.isMultiples = g === "Separiert";
render(state);
},
The last change is to the voronoi functionality which has now been updated to use Delaunay. The only noticeable change now is how boundaries are set, now accepting a single array of numbers, rather then two points:
// This d3 v5 code snippet should be updated to ...
var mouseOverlay = sszvis
.voronoi()
...
.bounds([
[-bounds.padding.left, -bounds.padding.top],
[bounds.innerWidth + bounds.padding.right, bounds.innerHeight + 20],
]);
// ... this d3 v7 code snippet
var mouseOverlay = sszvis
.voronoi()
...
.bounds([
-bounds.padding.left,
-bounds.padding.top,
bounds.innerWidth + bounds.padding.right,
bounds.innerHeight + 20,
]);
Full Changelog: v2.6.8...v3.0.0