Releases: nteract/semiotic
More Little Fixes and Features
There have been a lot of patch releases lately. That's because the docs are getting rewritten and it's been a great process for showing areas that were buggy or didn't make sense. This should be the last one. There will be a minor version bump when the new docs drop. Thanks to @susielu for finding so many of the issues that were resolved in this last series of patch releases.
FEATURES
- Axes can now take an
axisMarginOverrideobject that allows you to set the margins of your annotations when usingmarginalia. Thanks @torioLuz! nodesEdgesFromHierarchyused to require ad3-hierarchydecorated hierarchy js object but now you can send it just the object and it will assume it is default formatted (such as withchildren) and do thehierarchybit for you.
FIXES
- Chord diagrams weren't honoring margin properly
- Titles were causing re-renders in XYFrame
- Annotations were suppressed when they returned a projected coordinate of NaN, null or undefined, they are now positioned at 0 so you can see them and debug better
Clean Up Custom Network Layouts
FEATURES
- You can pass a function to your
networkType'szoomproperty that will be passed(nodes, size)where you can change the xy props of the nodes to zoom them the way you want. This is because some layouts don't come back within the bounds of the size you pass (I'm looking at you d3-flextree) and there's no way for Semiotic to guess, so you'll have to handle it. showLinePointsused to only take true/false but now honors also"top"and"bottom"which will change the points that appear in an area chart (like stackedarea or bumparea). In the past these used to only show the middle point of the area, but now you can change it to show the top or bottom.
Improve NetworkFrame Zoom
FEATURES
- NetworkFrame will do a better job of zooming your network. It used to distort it by stretching it to the size of the frame, now it maintains the aspect ratio
FIXES
- The various frames custom SVG and HTML annotation functions weren't all being sent the same properties. They are now.
v1.16.5
FIXES
- Some horizontal XY data wasn't being sent properly in the custom marks for OrdinalFrame
- Sankey diagrams should never have been honoring
directionthat's meant for hierarchical charts (if you want to change the direction of your sankeys, change the direction of the edges) instead they now honorverticalorhorizontalsettings in thenetworkType'sprojectionproperty. highlightannotationType wasn't getting parentLine information to the points and also wasn't letting you select a line just by using ID
FEATURES
nodesEdgesFromHierarchyis exported by Semiotic, it takes a hierarchical JS object and returns an object withnodesandedgesthat you can use for non-hierarchical viz types.- If you use
pointtype in OrdinalFrame andradialprojection withconnectorTypedefined, it will draw filled areas so you can properly create Radar Plots
Edge Hierarchies
Features
- NetworkFrame now allows you to try hierarchical network types even if you're sending an array of edges. It will attempt to make a hierarchy out of them and if it follows a strict single-parent rule (all edges have only one parent) it will make a hierarchy out of the data. This will include a step to create (and then filter out using a default setting change to
filterRenderedNodesa node withroot-generatedas its ID) so it will by default create one or more "trees" visible. Closes #367 - histogram and heatmap summary types now obey a
paddingandelementStyleFnprop to allow you to create padding between individual bars (minimum 1px width) and to style the bars.elementStyleFnis passed the(totalBinValue, percentOfMax, arrayOfPiecesInThisBin)closes #370
Fixes
Editable Annotations
CHANGES
- A number of changes in what data is sent and how the drag functions from
react-annotationare wrapped to enable adjusting annotations easily. Added a second example to https://emeeks.github.io/semiotic/#/semiotic/annotations which shows how to update annotations and store the update in state to persist the change.

- Updates
enclose,enclose-hullandenclose-rectto all acceptpaddingas the amount in pixels to buffer the shape. Before this, there was (and is still honored) padding, radiusPadding and buffer, which makes for ugly code for people wanting to work with these annotations.
FIXES
- InteractionLayer was not turning off interactivity when you turned off
hoverAnnotation
Bar/Line
FEATURES
OrdinalFramehas amultiAxisprop that causes the frame to evaluate separately the data derived from an array ofrAccessors to create multi-axis charts. The axes sent to theaxisprop (which despite its name can accept an array of axis objects) will be decorated in the same order as the rAccessor props to produce the correct axes elements. You can see an example here: https://emeeks.github.io/semiotic/#/semiotic/barline

enclose-hullnow identifies the closest point in the hull to draw the annotation connector, making it a better visual experience.

desaturation-layeris a new annotation type honored by all three frames that just renders a semi-transparent white rect that you can use to desaturate the viz layer. You can pass astyleobject with the annotation if you want to style the rect yourself.contoursummaryTypes now have apercentproperty that gives you the percent-of-maximum-density so that you can style them the same way you would heatmaps and hexbins- An axis object will now honor a
centerprop that will render the axis in the centerline of the viz (for making quadrant-style vizzes). The label still appears outside the viz

FIXES
motifsinNetworkFrameworks again- DAGRE networks don't rerender weirdly
- When a point was at the very top-edge of the frame it rendered the tooltip above the frame
- Add a bunch of props to the list of complain-if-they're-assigned-because-the-frame-doesn't-honor-them props.
- Add unique keys for DAGRE parallel edges
CHANGES
showSummaryPointsis a new prop in XYFrame to expose points for summaries (previouslyshowLinePointsexposed points for lines and summaries but that was a very hacky approachhexbinnow renders empty hexes in areas where there were no points, so as to match up withheatmap
Annotation Interactivity
Big Changes
areasin XYFrame is a problematic term, since it conflates with stacked areas and other things that are handled bylines. As of 1.16 they've been renamed tosummaryso all the existingareaClass,areaStyle,areasand so on will besummaryClass,summaryStyle,summariesand so on. This is not a breaking change (only a minor version bump) because theareaterminology is still honored for backward compatibility.
Features
- A
summaryTypewith type set toridgelinewill now accept stringcurveprops along withd3-shapecurves, matching functionality in XYFrame - Bumpline starts counting at 1 instead of 0 so you get a more semantically meaningful rank description. It also flips the extent by default, so Rank 1 is on top.
ridgelinesummary types inOrdinalFramewill now honor anaxisprop in thesummaryTypeand display an axis for each summary, likehistogram- Pass
voronoiHoverto annotation rules, this allows you to fire off tooltips using Semiotic's built-in system (though you still need to enable pointer-events on any items you want to fire events from) - OrdinalFrame honors an
ordinal-lineannotation type to allow people to compose bar+line charts with interactivity on the line portion

See the example at the bottom of the Creating Bar Chart page for how to use ordinal-line. More interactive annotation types should be coming and you can experiment with using voronoiHover on your custom annotations.
https://emeeks.github.io/semiotic/#/semiotic/creatingbarchart
Square Root Bar Charts?
CLEANUP
d3-shapebump version to^1.2.0
FIXES
- Passing updated point data wouldn't always trigger an XYFrame update
FEATURES
Axisnow has adynamicLabelPositionprop that needs to be set totrueto enable the bounding-box based collision detection to adjust labels (introduced in an earlier version) because of performance issues with automatically running this for every Axis.OrdinalFrame'srScaleTypewill now take an instantiated scale (matching XYFrame) so you can make scales with settings (like scaleExp) like you can with XYFrame.XYFramesupports anarealineType that sets the y1 accessor to() => 0for easy line area charts.- Styling of
OrdinalFramepieces now passes the calculated props of the piece so you can useoIndexandrIndexto style pieces made by multiple accessors - Bar pieces now have a minimum size of 0 px instead of 1px, which caused weird issues with rendering offset
Arcs, Matrices & accessor index
Features
-
In
XYFrame, points and lines are decorated with xIndex, yIndex, lineIndex corresponding to the array position of xAccessors, yAccessors and lineAccessors. Likewise, OrdinalFrame decorates pieces with rIndex and oIndex which correspond to which of the accessors generated them. -
NetworkFramehas a newmatrixtype that creates an adjacency matrix.

-
NetworkFramehas a newarctype that creates an arc diagram.


