chore(deps): update dependency layerchart to v2.0.0-next.56#754
Merged
baseplate-admin merged 1 commit intomainfrom Apr 17, 2026
Merged
chore(deps): update dependency layerchart to v2.0.0-next.56#754baseplate-admin merged 1 commit intomainfrom
baseplate-admin merged 1 commit intomainfrom
Conversation
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 contains the following updates:
2.0.0-next.48→2.0.0-next.56Release Notes
techniq/layerchart (layerchart)
v2.0.0-next.56Compare Source
Minor Changes
feat(Circle, Ellipse): Support pattern/gradient
fillvalues on the<Html>layer by switching frombackground-colorto thebackgroundshorthand (withbackground-origin: border-boxto keep patterns aligned under the border). Accepts values produced by<Pattern>/<LinearGradient>in HTML mode. (#449)feat(Pattern): Support
<Html>layer by producing CSSrepeating-linear-gradient(lines) andradial-gradient(circles) values usable as abackground/fill. Gradient-valuedbackground(e.g.<Pattern background={gradient}>) is also supported. (#449)Patch Changes
fix(Pattern): Restore canvas layer support by registering as a
groupnode so snippet children (e.g.<Rect fill={pattern}>) render correctly (#449)fix(Rect): On the
<Html>layer, setbackground-origin: border-boxso fills/patterns start at the outer edge — previously the CSSbackgroundshorthand reset origin topadding-box, shifting patterns inward byborder-widthwhen a stroke was applied. (#449)fix(Rect, Circle, Ellipse): Apply
box-sizing: border-boxon the<Html>layer so the visual extent equalswidth×height(orr * 2,rx * 2×ry * 2) — the border is drawn within that extent instead of added to it, matching SVG bounds. (#449)fix(Rect, Circle, Ellipse): On the
<Html>layer, defaultborder-widthto1pxwhenstrokeis set without an explicitstrokeWidth, matching SVG's implicitstroke-width: 1. Also ensures Circle/Ellipseborder-widthgets the requiredpxunit. (#449)v2.0.0-next.55Compare Source
Minor Changes
feat(Bar, Bars): Support
<Html>layer (#449)Bar/Bars now render in
<Html>layers in addition to<Svg>and<Canvas>, including per-cornerroundedvariants (top,bottom,left,right,edge, and individual corners). Previously, any non-uniformroundedvalue fell through to a<Path>and was SVG-only.feat(ClipPath, RectClipPath, CircleClipPath, GeoClipPath): HTML layer support + unified
pathAPI (#449)ClipPathnow accepts a singlepath: string(SVG pathdsyntax) that drives all three layers:<path d={path}>inside the<clipPath>element.Path2Dand applied viactx.clip(...).clip-path: path("${path}")on a wrapper<div>covering the chart container.This replaces the previous
canvasClip/canvasClipDepscallbacks (and skipped HTML entirely) with a single declarative value. Theclipsnippet is still accepted for advanced/custom SVG content.RectClipPath,CircleClipPath, andGeoClipPathare rewritten on top of this — they each compute a path string (d3-geo-path already emits one natively) and pass it through. All three now support<Html>layers in addition to<Svg>and<Canvas>.Note:
clip-path: path()requires Chrome 88+, Safari 13.1+, Firefox 118+.feat(ClipPath, RectClipPath, CircleClipPath, GeoClipPath): Add
invertprop to render content outside the clip shape (cutouts/masks) across SVG, Canvas, and HTML layers (#449)feat(Line, Rect, Circle, Text): Multi-layer compatible
dashArrayand inline color props (#449)dashArrayprop toLine,Rect, andCircle. Accepts a number, array, or SVG-style string and maps tostroke-dasharray(SVG),setLineDash(Canvas), and eitherrepeating-linear-gradient(HTML lines) orborder-style: dashed(HTML borders). Previously dashed styling was SVG-only when applied via CSS class or attribute.TextandLineHTML branches now honor thefill/strokeprops as inlinecolor/background, so prop-based colors work across all three layers (not just SVG/Canvas).Grid.x/Grid.yandAxis.gridnow acceptstroke,strokeWidth,opacity, anddashArrayin their object form, matching the props forwarded to the underlying line.Rulealready forwarded arbitrary Line props via spread;dashArraynow works there unchanged.parseDashArrayanddashArrayToGradienthelpers frompathutils.feat(Tree, Link, Connector): Add radial support (#831)
Treenow detects<Chart radial>and lays out withd3.tree().size([2π, min(width, height)/2])plus radial separation. Nodes emit polar coords (x= angle,y= radius).Connectorgains aradialprop (defaults toctx.radial) that interpretssource/targetas polar and dispatches to newgetConnectorRadialPresetPath/getConnectorRadialD3Pathhelpers. Radial behavior per connectortype:straight— straight cartesian linesquare— radial → arc at midR → radialbeveled— chord at source radius with chamfered corner (controlled byradius)rounded— visx LinkRadialCurve Bezierd3—d3.linkRadialby default; with acurveprop,curveStep/curveStepBefore/curveStepAftermap to polar arcs/radials, other curves go throughd3.lineRadialLinkforwardsradialtoConnectorautomatically when inside a radial<Chart>.feat(Rect): Add
cornersprop for per-corner rounding (#449)New
cornersprop accepts either a number (equivalent torx), a[topLeft, topRight, bottomRight, bottomLeft]tuple, or{ topLeft, topRight, bottomRight, bottomLeft }. Works across<Svg>,<Canvas>, and<Html>layers — Svg renders a<rect>when corners are uniform and a<path>when they differ, Canvas usesroundRect's per-corner radii, and Html uses the 4-valueborder-radiusshorthand.Also exports a shared
roundedRectPath(x, y, width, height, [tl, tr, br, bl])helper frompathutils for building per-corner rounded-rect path data.Patch Changes
fix(canvas): Compose globalAlpha multiplicatively so Group opacity propagates to children (#831)
Canvas
renderPathDatawas overwritingctx.globalAlphawith absolute values for element opacity, fill opacity, and stroke opacity. This meant a parent<Group opacity={0.2}>had no effect on child marks rendered on canvas — the child's own opacity (defaulting to 1) would replace the inherited value.Now all three sites multiply against the current
globalAlpha, which correctly composes with ancestor Group opacity set viasave()/restore()scoping. Also removes double-application of elementopacityinside the fill/stroke blocks (it's already applied at the element level).v2.0.0-next.54Compare Source
Minor Changes
feat: New
GeoClipPathcomponent for clipping content to GeoJSON boundaries in both SVG and Canvas modes (#449)feat(Text): Add
segmentsprop for inline mixed-style text (#449)New
segmentsprop accepts an array of{ value, class }objects to render text with different styles (font size, weight, color) inline. Works across SVG (via tspans), Canvas (via sequential measureText/fillText), and HTML layers. Useful for labels that combine a bold name with a lighter value, such as treemap headers.feat(Hull): Add CommonStyleProps (fill, fillOpacity, stroke, strokeOpacity, strokeWidth, opacity) for Canvas layer compatibility (#449)
feat(Tooltip): Add
fadeDurationprop to control fade in/out transition (#828)The fade transition on
Tooltip.Rootis now configurable via thefadeDurationprop (default:100ms). Set to0to disable the fade transition entirely.feat(Tooltip): Portal tooltip to body by default to fix overflow clipping. Resolves #446 (#828)
Tooltip.Root now portals to
document.body(or.PortalTarget) by default using theportalaction from@layerstack/svelte-actions. This prevents tooltips from being clipped by ancestor elements withoverflow: hidden. The tooltip usesposition: fixedwith viewport-relative coordinates when portaled. Setportal={false}to restore the previous inline behavior. Bothcontained="container"andcontained="window"modes continue to work correctly with portaling.Patch Changes
fix(ArcLabel): Support rotation in Canvas mode (#449)
Changed
centroid-rotatedandcentroid-radialplacements to passrotateprop instead of SVGtransformstring toText, enabling rotation in Canvas rendering.fix: Pie and Arc components now correctly use Chart's
xRangeprop for angle degrees instead of the computed viewport pixel range, and compute radius from chart dimensions instead of scale range (#449)v2.0.0-next.53Compare Source
Minor Changes
feat: Support pre-projected topologies in
GeoLegendviareferenceScale(#449)Add a
referenceScaleprop toGeoLegendfor charts that render pre-projected data withgeoIdentity(e.g.us-atlas'scounties-albers-10m/states-albers-10m, pre-projected withgeoAlbersUsa().scale(1300)). When provided, pixels-per-distance is derived from the chart's fit scale and the supplied base scale, bypassing theprojection.invert+geoDistancepath which only works for real lon/lat projections. TheGeoPathbubble-map example now renders a correct scale bar.v2.0.0-next.52Compare Source
Minor Changes
feat(ArcLabel): New component for positioning text labels on arc segments (#817)
ArcLabelis a new marking component for placing text (and optional leader lines) relative to an arc. It's used internally byPieChartandArcChartwhen thelabelsprop is set, but can also be rendered directly inside anArcchildren snippet.Supported placements:
centroid— at the arc centroid (horizontal text, default)centroid-rotated— at the centroid, rotated to follow the arc tangent, flipped where needed so text stays uprightcentroid-radial— at the centroid, rotated to read along the radial direction (center → outer edge)inner/middle/outer— along the inner, medial, or outer arc path (centered viastartOffset: '50%'by default)callout— outside the arc with a leader line that bends horizontally to the labelArcLabelaccepts a singleoffsetprop that is routed to the placement-appropriate radial padding (centroid offset,innerPadding/outerPadding, orcalloutLineLength), pluscalloutLineLength/calloutLabelOffset/calloutPaddingfor fine-grained control of callout leader lines. The leader line renders via thePathprimitive, so it works in both SVG and Canvas chart layers.breaking(Arc): Center arc text along path by default for
inner/middle/outerpositions (#817)getArcTextProps('inner' | 'middle' | 'outer')now defaults tostartOffset: '50%'withtextAnchor: 'middle', centering the text along the arc path rather than anchoring it at the arc start. When an explicitstartOffsetis provided, the anchor falls back to'start'so the text begins at that position (matching prior behavior for callers that set a start offset).feat(Arc): Add
innerPaddingoption togetArcTextProps/getTrackTextProps(#817)ArcTextOptionsnow supports aninnerPaddingoption, symmetric to the existingouterPadding. Positive values shrink the inner radius used to build theinner/middlearc text paths, moving text inward (toward the chart center). Previously, offsetting aninner-placed arc label away from the arc edge required overriding the path manually; now it works the same asouterPaddingdoes foroutertext.feat(CircleLegend): New component for visualizing radius (
rScale) values as nested circles (#818)CircleLegenddisplays a set of bottom-aligned nested circles representing values from a radius scale, useful alongside bubble maps and scatter charts that encode magnitude via circle area. By default it readsrScalefrom the chart context, but ascaleprop can also be passed to render standalone.Supports
tickValues/ticks/tickFormatfor value selection and formatting, atitlerendered centered above the circles, andlabelPlacement="right" | "left" | "inline"to render tick labels with a leader line on either side of the circles or centered inside each circle near the top.feat(GeoLegend): New scale-bar legend showing real-world distance for the current
Chartprojection (#818)GeoLegendreads the active geo projection from the chart context and renders a labeled scale bar with tick subdivisions. By default it picks a "nice" round distance that covers ~25% of the chart width, butdistancecan be passed for an explicit value. Supportsunits="km" | "mi", configurableticks,tickFormat,title, and the standardplacementprops. Inspired by Harry Stevens' d3-geo-scale-bar.feat(Labels): Add
middleplacement and changecenterto center within the bar body (#449)placement="center"now positions the label at the center of the bar body (between the value edge and the baseline). The previouscenterbehavior (label aligned to the value edge with a middle anchor) is now available as the newplacement="middle".feat(Legend, CircleLegend): Show an indicator of the current tooltip value on the legend (#818)
Legend(ramp variant) now draws a small upward-pointing arrow below the color ramp at the position of the currently hovered value, andCircleLegenddraws a 50%-opacity filled circle at the corresponding radius. Both auto-read the hovered data fromctx.tooltip.dataand pipe it through the chart's color (ctx.c) / radius (ctx.r) accessors, so wiring is automatic for charts that configurec/r/cScale/rScaleviaChartprops.A new
valueprop on both components allows explicitly setting the indicator value (overriding the auto-detection), useful when the tooltip data shape doesn't match the chart's accessor.For
scaleThreshold/scaleQuantize/scaleQuantilescales, theLegendindicator centers on the matching bucket swatch.feat(PieChart/ArcChart): Add top-level
labelsprop (#817)PieChartandArcChartnow accept alabelsprop that renders text labels on each arc without requiring a customarcsnippet. Passtrueto enable defaults (centroid placement, default value accessor), or an object to configure anyArcLabelprops — placement, offset, value accessor, callout line lengths, leader line style, text class, etc.v2.0.0-next.51Compare Source
Minor Changes
feat: New
GeoRastercomponent for reprojecting raster imagery (e.g. NASA Blue Marble) onto any d3-geo projection via per-pixel inverse sampling on Canvas (#815)feat: Add
renderChart()tolayerchart/serverfor server-side chart-to-image rendering (PNG/JPEG) (#813)Patch Changes
feat: Add
strokeandfillprops toAxisandGridfor explicit color control (useful for SSR where CSS variables are unavailable) (#813)fix: Skip mark x/y/data from domain/series calculation when geo projection is active (#449)
fix: Default geo projection
translateto container center whentranslateandfitGeojsonare not specified, instead of using d3-geo's fixed default ([480, 250]) (#815)fix: improve compatibility with UnoCSS Svelte scoped preprocessing (#813)
asassertions from exported Svelte markup in core mark components so preprocessors that parse markup expressions as plain JavaScript can consume packaged components without failingv2.0.0-next.50Compare Source
Minor Changes
feat: New Trail component for variable-width lines (#449)
fix(Axis): Default
tickSpacingtonullfor categorical band scales, showing all ticks by default instead of reducing them. UsetickSpacing={80}to opt-in to tick reducing on categorical band scale axes. (#449)Patch Changes
v2.0.0-next.49Compare Source
Minor Changes
feat(Labels): Add
smartplacement option (#799)New
placement="smart"mode that dynamically positions labels based on neighboring point values (peak, trough, rising, falling) to reduce overlapping.feat(Chart, BrushState): Add band scale (categorical) support for transform pan/zoom and brush selection. Uses range-rescaling pattern to smoothly zoom and pan categorical bar charts. Automatically constrains panning to data boundaries and prevents zooming out past initial view. (#449)
feat(Chart): In projection mode,
scaleExtentandtranslateExtentare now interpreted as relative values (like d3-zoom).scaleExtent: [0.5, 8]means 0.5x to 8x of the fitted projection scale.translateExtentis offset from the initial fitted position in pixels. (#449)feat(Spline): Support function-valued
stroke,fill, andopacityfor per-segment styling (#449)feat(Text): Add
formatprop and tween numericvaluewhenmotionis configured (#449)Patch Changes
Support
tickSpacingfor band scales on Axis, thinning tick labels when the domain is larger than the available space. Automatically shows more tick labels when zoomed in on band scale transforms. (#449)perf: Optimize primitive component instantiation (~3-5x faster for Rect, Circle, Ellipse, Line, Text, Path, Group) (#449)
createMotion: Fast-path passthrough when nomotionprop is provided, avoiding$state/$effectoverhead per axiscreateDataMotionMap: Short-circuit whenmotionisundefined, skippingparseMotionPropoverheadcreateKey: Only create fill/stroke key trackers in canvas layer (skipped for SVG/HTML)registerComponent: SkipregisterMarkfor emptyMarkInfo(pixel-mode marks)$effectfor data motion tracking when no motion is configuredparseMotionPropcalls whenmotionisundefinedfeat(Marker): Add
squareandsquare-stroketypes (#805)fix(GeoPath): Fix canvas tooltip by conditionally passing onclick to Path, preventing non-interactive overlays from capturing hit canvas events (#449)
fix(scaleBandInvert): Account for range offset in band scale inversion. Previously assumed range started at 0, causing incorrect pixel-to-category mapping when the scale range was transformed. (#449)
fix(TransformContext): Reactively sync
processTranslateanddisablePointerto TransformState when props change. Fixes inverted globe dragging when dynamically switching between flat and globe projections. (#449)fix(Chart): Enable scroll zoom for globe projections by including
scale: truein defaulttransformApplyfor globes. (#449)feat(Raster, Contour): support bounded geo raster overlays with projected interpolation (#449)
feat: Add Month component (#671)
fix(LinearGradient, RadialGradient): Register as
groupinstead ofmarkin canvas component tree so wrapped children (e.g. Arc, Path) are rendered (#449)Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.