Releases (265)
layerchart@2.16.0
Minor Changes
- feat(Chart): Add
lazyto build a chart only once its container nears the viewport, with aplaceholdersnippet shown until then and alazysetting to make it the default for every chart (#996)
Patch Changes
- fix: Read data keys containing a period (e.g.
y="temp.max") as a flat key before falling back to a nested path (#1040) (#1043)
@layerchart/webgl@2.15.0
Minor Changes
-
feat: Support nearly all of LayerChart's components, including the simplified charts (
BarChart,LineChart, ...), facets, radial charts, clip paths, gradients, patterns, andBlur(#1036) -
feat: Marks take core's props, including
motion,draw, markers, dashes, classes, seriesprops, and pointer events (#1036) -
feat: Layer-agnostic marks and
Layer(type="webgl"), drawing core's versions inSvg,Canvas, andHtmllayers so one chart can switch between all four; import WebGL-only marks from@layerchart/webgl/webgl(#1036) -
feat: Re-export all of
layerchart, so a chart needs only@layerchart/webgl(#1036)
Patch Changes
-
fix: Marks look as they do in a
Canvaslayer, including default colors, class styles, axes, text, isometric charts, and geo fills (#1036) -
perf(Text): Reuse label paintings, so charts with many labels drag faster (#1036)
-
Updated dependencies [
e87111f,e87111f,e87111f,e87111f,e87111f]:- layerchart@2.15.0
layerchart@2.15.0
Minor Changes
- feat:
layerchart/baseexports the layer-agnostic bases of LayerChart's marks and charts, andsettings.layeracceptswebgl, for@layerchart/webgl(#1036)
Patch Changes
-
fix: Restore
LinearGradientandPatternfills and strokes inCanvaslayers (#1036) -
fix(Canvas): Paints marks mounted after their siblings (ex. inside an
{#if}) where they're declared (likeSvg), rather than on top (#1036) -
fix(LinearGradient): Lay out across each shape it paints in
CanvasandHtmllayers (withx1/y1/x2/y2androtate), as inSvg(#1036) -
fix: Marks draw nothing outside an
Svg,Canvas, orHtmllayer rather than throw, andGeoPointdraws in anHtmllayer (#1036)
@layerchart/webgl@2.14.0
layerchart@2.14.0
Minor Changes
-
feat(Chart): Add
paddingStateto the chart context, so a custom axis (or any mark drawing outside the plot) canreserve()room inpadding="auto"andrelease()it, and read which sides are'auto'fromautoSides(autoPaddingSidesis deprecated in its favor) (#1039) -
feat: Add
widthandheighttoshapeLabel()'s result, the size of the room it found (ex. for an image placed there) (#1032)
Patch Changes
-
fix(Axis): Measure labels again once styles injected on mount land (ex. Vite's dev server pre-bundling layerchart), so
padding="auto"andtickOcclusionno longer fit them at the browser's default font size until a resize (#1039) -
fix(Axis): Measure tick labels and titles with the
lc-textclass they're drawn with, sopadding="auto"andtickOcclusionfit labels sized through.lc-text(ex. shadcn-svelte's chart container) (#1038) (#1039) -
fix(Labels): Fade the other series'
layout="shape"labels while one is highlighted (ex. by hovering the legend), as their areas do (#1032)
layerchart@2.13.0
Minor Changes
-
feat(Labels): Add
layout="shape"to label each GeoJSON feature or series area where it has the most room (#1023) -
feat: Add
shapeLabel()util to find where to label a shape (the point inside it farthest from its edges), withaspect,fit(the largest circle, or square or rectangle),centroidWeight,minDistanceandpreferoptions (#1023) -
feat(Voronoi): Add
clipto cut cells to a shape (ex. a GeoJSON feature) (#1023)
Patch Changes
-
fix(Area): Fade the other areas while a legend item for a
ccategory is hovered, as lines, points and bars do (#1023) -
fix(GeoTile): Draw part of a loaded ancestor's image in a tile's place while its own loads, rather than leaving it empty. (#1024)
-
fix(Labels): Type
dataas an array of the items itsvalueandfillaccessors receive (#1023) -
fix: Top each
stackExpandstack at exactly 100%, so the axis no longer rounds up to 110% (#1023) -
fix(TransformContext):
zoomTo(center, rect)fits the whole rect in view, rather than only its height in a wide chart (or width in a tall one) (#1023)
@layerchart/webgl@2.13.0
Patch Changes
-
fix(GeoTile): Raise detailed tiles from elevation two zooms up, so turning a 3D view doesn't keep reloading it (#1024)
-
fix(GeoTile): Keep coarser tiles from showing through sharper ones in low ground (ex. a canyon) while tiles load (#1024)
-
fix(GeoTile): Stop zooming out from leaving holes while tiles load (#1024)
-
fix(WebGL): Pan a perspective view by dragging the ground under the pointer, rather than by a fixed amount that lags behind farther terrain (#1024)
-
fix(WebGL): Turn a zoomed-in perspective view about where it last zoomed towards, rather than about a point that drifts off beside the camera (#1024)
-
fix(WebGL): Zoom a perspective view towards what's under the pointer, rather than towards a fixed point that can be inside the terrain (#1024)
-
Updated dependencies [
396a23d,3597609,396a23d,396a23d,396a23d,396a23d,396a23d,396a23d]:- layerchart@2.13.0
layerchart@2.12.0
Minor Changes
-
feat(Chart): Support
padding="auto"(or per side, ex.padding={{ left: 'auto' }}) to fit the axis tick labels and title (#1011) -
feat(Treemap): Add
selectedprop to zoom into a node without distorting tiles or padding (#1017)
Patch Changes
-
fix(Chart): Allow
paddingderived from the boundxDomain/yDomainwithout aderived_references_selferror (#1009) (#1011) -
fix(Axis): Measure
tickOcclusionlabels in the font they render in, so labels enlarged by a class (ex.text-lg) don't overlap (#1011) -
chore: Remove
d3-dsv,d3-geo-polygonandd3-sankeydependencies, dropping 12 packages (~2.9 MB) from installs, including the command-line-onlycommander,iconv-liteandrw, and older duplicate versions ofd3-array,d3-shapeandd3-path(sankeyGraphFromCsv()no longer handles quoted fields) (#1010)