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
axisMarginOverride
object that allows you to set the margins of your annotations when usingmarginalia
. Thanks @torioLuz! nodesEdgesFromHierarchy
used to require ad3-hierarchy
decorated 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 thehierarchy
bit 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
'szoom
property 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. showLinePoints
used 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
direction
that's meant for hierarchical charts (if you want to change the direction of your sankeys, change the direction of the edges) instead they now honorvertical
orhorizontal
settings in thenetworkType
'sprojection
property. highlight
annotationType wasn't getting parentLine information to the points and also wasn't letting you select a line just by using ID
FEATURES
nodesEdgesFromHierarchy
is exported by Semiotic, it takes a hierarchical JS object and returns an object withnodes
andedges
that you can use for non-hierarchical viz types.- If you use
point
type in OrdinalFrame andradial
projection withconnectorType
defined, 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
filterRenderedNodes
a node withroot-generated
as its ID) so it will by default create one or more "trees" visible. Closes #367 - histogram and heatmap summary types now obey a
padding
andelementStyleFn
prop to allow you to create padding between individual bars (minimum 1px width) and to style the bars.elementStyleFn
is 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-annotation
are 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-hull
andenclose-rect
to all acceptpadding
as 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
OrdinalFrame
has amultiAxis
prop that causes the frame to evaluate separately the data derived from an array ofrAccessor
s to create multi-axis charts. The axes sent to theaxis
prop (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-hull
now identifies the closest point in the hull to draw the annotation connector, making it a better visual experience.
desaturation-layer
is 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 astyle
object with the annotation if you want to style the rect yourself.contour
summaryTypes now have apercent
property 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
center
prop that will render the axis in the centerline of the viz (for making quadrant-style vizzes). The label still appears outside the viz
FIXES
motifs
inNetworkFrame
works 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
showSummaryPoints
is a new prop in XYFrame to expose points for summaries (previouslyshowLinePoints
exposed points for lines and summaries but that was a very hacky approachhexbin
now renders empty hexes in areas where there were no points, so as to match up withheatmap
Annotation Interactivity
Big Changes
areas
in 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 tosummary
so all the existingareaClass
,areaStyle
,areas
and so on will besummaryClass
,summaryStyle
,summaries
and so on. This is not a breaking change (only a minor version bump) because thearea
terminology is still honored for backward compatibility.
Features
- A
summaryType
with type set toridgeline
will now accept stringcurve
props along withd3-shape
curves, 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.
ridgeline
summary types inOrdinalFrame
will now honor anaxis
prop in thesummaryType
and display an axis for each summary, likehistogram
- Pass
voronoiHover
to 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-line
annotation 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-shape
bump version to^1.2.0
FIXES
- Passing updated point data wouldn't always trigger an XYFrame update
FEATURES
Axis
now has adynamicLabelPosition
prop that needs to be set totrue
to 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
'srScaleType
will now take an instantiated scale (matching XYFrame) so you can make scales with settings (like scaleExp) like you can with XYFrame.XYFrame
supports anarea
lineType that sets the y1 accessor to() => 0
for easy line area charts.- Styling of
OrdinalFrame
pieces now passes the calculated props of the piece so you can useoIndex
andrIndex
to 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. -
NetworkFrame
has a newmatrix
type that creates an adjacency matrix.
-
NetworkFrame
has a newarc
type that creates an arc diagram.