Conversation
7d83d6f to
7e34eb8
Compare
a3e2551 to
bf5b077
Compare
bf5b077 to
4ce6de8
Compare
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to next, this PR will be updated.
nextis currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, runchangeset pre exitonnext.Releases
layerchart@2.0.0-next.58
Major Changes
breaking: Merge
ConnectorintoLink, removeConnectorcomponent (#449)Linknow supports both pixel mode (x1/y1/x2/y2props) and data mode (data+source/target/x/yaccessors), mirroring the pattern used by primitives likeCircle,Text, andRect.Migration:
<Connector source={{...}} target={{...}} ... />→<Link x1={...} y1={...} x2={...} y2={...} ... /><Link explicitCoords={{ x1, y1, x2, y2 }} />→<Link {x1} {y1} {x2} {y2} />(or<Link {...linkPositions[i]} />)All Connector props (
type,curve,sweep,radius,bend,orientation,radial, markers, motion) are available directly onLink. TheexplicitCoordsprop andConnectorexport are removed.Minor Changes
feat(AnnotationLine): Add
x1/y1/x2/y2props for sloped lines (#449)x1,y1,x2,y2to draw a line between arbitrary points. Missing coordinates fall back to the corresponding axis range (sox1/x2alone still span the y range, etc.). The existingx/yshorthand for full-span vertical/horizontal lines is unchanged.labelPlacement,labelXOffset, andlabelYOffsetapplied along and perpendicular to the line.feat(AnnotationPoint): Add
linkprop for ring-note style callouts, plus geo projection support (#449)link={true}orlink={{ type: 'beveled', radius: 20, ... }}etc. to draw a<Link>from the ring edge to the label. AnyLinkprop (type,curve,sweep,radius,bend,class, ...) can be passed through.<Chart>,x/yare now interpreted as[lon, lat]and projected directly, soAnnotationPointcan be used on maps.feat(Connector): Add
'swoop'connector type (#449)New
'swoop'connector type draws a circular arc between source and target, equivalent to ObservablePlot's Arrowbendoption. Configured via a newbendprop (degrees, default22.5) — positive bends right (clockwise from source to target), negative bends left,0draws a straight line. Works in both cartesian and radial modes;Linkforwards it automatically.feat(tooltipContext, Voronoi): Add
x/yaccessor overrides and default array endpoint to max (#449)x/yprops ontooltipContextandVoronoiaccept anAccessor(property name string or function). When set, hit-detection points use these accessors instead of the Chart'sx/y. Useful when the Chart's accessor returns an array (e.g.x={['POP_1980', 'POP_2015']}) and you want detection at a specific endpoint:x/yaccessor ontooltipContext/Voronoi.Patch Changes
fix(Chart): Explicit
<Chart data>now takes precedence over marks' implicit-series data (#449)When a mark registered its own filtered dataset via
markInfo(e.g. a decorative<Text data={highlighted}>showing labels for a subset), two things went wrong:ctx.datawould silently switch to the filtered subset viaseriesState.visibleSeriesData, causing sibling array-driven marks (like<Link>) to iterate only the subset.Now when
<Chart data>is explicit (non-empty):ctx.dataalways returns the chart's data.y={['v1', 'v2']}) are treated as decorative and don't create implicit series — even if they have their owndataarray.Marks with their own data still contribute to
flatDatafor domain calculation when their accessor differs from the chart's (the multi-dataset / multi-series scenario).fix(Connector, Link): Orient d3 step curves by
orientation(#449)orientation?: 'horizontal' | 'vertical'prop toConnector(defaults to'horizontal').Linkforwards its own orientation so step curves step along the natural flow direction.curveStep,curveStepBefore, andcurveStepAfternow step alongyin vertical orientation instead of always stepping alongx.fix(GeoPath): Avoid passing
undefinedevent handlers to underlyingPath, preventing a Svelte error while preserving canvas hit-testing for non-interactive paths (#449)fix: Allow negative string values (e.g.
y="-6") inTextposition props to be treated as pixel values instead of data property names (#449)