Skip to content

Simplified charts crash server side when ssr is - #943

Merged
techniq merged 1 commit into
mainfrom
techniq/simplified-charts-crash-server-side-when-ssr-is
Oct 12, 2026
Merged

techniq merged 1 commit into
mainfrom
techniq/simplified-charts-crash-server-side-when-ssr-is

Conversation

@techniq

@techniq techniq commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

fixes #940

- Avoid snippet/prop name collisions for marks and Layer children
- Add SSR coverage for default and custom chart marks
@changeset-bot

changeset-bot Bot commented Oct 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 79ef87f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
layerchart Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Oct 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/layerchart@943

commit: 79ef87f

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
layerchart ✅ Ready (View Log) Visit Preview 79ef87f

@github-actions

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

Use-Case Scenarios

Base (agnostic) (4 changed)
Scenario Current New Change
🟡 base-svg-agnostic 383.17 KB
89.22 gz
383.24 KB
89.22 gz
+0.07 KB (+0.0%)
-0.00 gz (-0.0%)
🟡 base-canvas-agnostic 383.17 KB
89.22 gz
383.24 KB
89.22 gz
+0.07 KB (+0.0%)
-0.00 gz (-0.0%)
🟡 base-html-agnostic 383.17 KB
89.22 gz
383.24 KB
89.22 gz
+0.07 KB (+0.0%)
-0.00 gz (-0.0%)
🟡 base 383.16 KB
89.22 gz
383.24 KB
89.21 gz
+0.07 KB (+0.0%)
-0.00 gz (-0.0%)
Cartesian charts (24 changed)
Scenario Current New Change
🟡 PieChart 426.03 KB
98.48 gz
426.19 KB
98.47 gz
+0.16 KB (+0.0%)
-0.00 gz (-0.0%)
🟡 ArcChart 419.05 KB
97.11 gz
419.20 KB
97.10 gz
+0.16 KB (+0.0%)
-0.01 gz (-0.0%)
🟡 LineChart 414.44 KB
96.58 gz
414.59 KB
96.58 gz
+0.16 KB (+0.0%)
+0.01 gz (+0.0%)
🟡 PieChart-canvas 411.29 KB
95.44 gz
411.37 KB
95.42 gz
+0.08 KB (+0.0%)
-0.02 gz (-0.0%)
🟡 AreaChart 406.75 KB
94.28 gz
406.91 KB
94.28 gz
+0.16 KB (+0.0%)
+0.00 gz (+0.0%)
🟡 ArcChart-canvas 404.88 KB
94.21 gz
404.96 KB
94.21 gz
+0.08 KB (+0.0%)
-0.00 gz (-0.0%)
🟡 area-chart 402.15 KB
93.25 gz
402.22 KB
93.25 gz
+0.07 KB (+0.0%)
-0.00 gz (-0.0%)
🟡 PieChart-svg 401.33 KB
92.65 gz
401.41 KB
92.64 gz
+0.08 KB (+0.0%)
-0.01 gz (-0.0%)
🟡 line-chart-interactive 400.37 KB
93.06 gz
400.44 KB
93.06 gz
+0.07 KB (+0.0%)
-0.00 gz (-0.0%)
🟡 pie-chart 396.69 KB
92.20 gz
396.77 KB
92.19 gz
+0.07 KB (+0.0%)
-0.00 gz (-0.0%)
🟡 ArcChart-svg 394.91 KB
91.31 gz
394.99 KB
91.30 gz
+0.08 KB (+0.0%)
-0.01 gz (-0.0%)
🟡 BarChart 394.52 KB
91.60 gz
394.68 KB
91.61 gz
+0.16 KB (+0.0%)
+0.00 gz (+0.0%)
🟡 AreaChart-canvas 393.36 KB
91.55 gz
393.44 KB
91.56 gz
+0.08 KB (+0.0%)
+0.01 gz (+0.0%)
🟡 bar-chart 388.46 KB
90.31 gz
388.53 KB
90.31 gz
+0.07 KB (+0.0%)
-0.00 gz (-0.0%)
🟡 ScatterChart 388.02 KB
90.28 gz
388.18 KB
90.29 gz
+0.16 KB (+0.0%)
+0.01 gz (+0.0%)
🟡 scatter-chart 384.25 KB
89.51 gz
384.32 KB
89.50 gz
+0.07 KB (+0.0%)
-0.00 gz (-0.0%)
🟡 line-chart 383.66 KB
89.27 gz
383.74 KB
89.27 gz
+0.07 KB (+0.0%)
-0.00 gz (-0.0%)
🟡 AreaChart-svg 383.25 KB
88.58 gz
383.34 KB
88.58 gz
+0.08 KB (+0.0%)
+0.01 gz (+0.0%)
🟡 BarChart-canvas 380.81 KB
88.81 gz
380.90 KB
88.82 gz
+0.09 KB (+0.0%)
+0.01 gz (+0.0%)
🟡 LineChart-canvas 377.39 KB
88.15 gz
377.47 KB
88.16 gz
+0.08 KB (+0.0%)
+0.00 gz (+0.0%)
🟡 ScatterChart-canvas 374.54 KB
87.46 gz
374.62 KB
87.47 gz
+0.08 KB (+0.0%)
+0.01 gz (+0.0%)
🟡 BarChart-svg 370.71 KB
85.85 gz
370.80 KB
85.86 gz
+0.09 KB (+0.0%)
+0.00 gz (+0.0%)
🟡 LineChart-svg 367.29 KB
85.20 gz
367.37 KB
85.20 gz
+0.08 KB (+0.0%)
+0.00 gz (+0.0%)
🟡 ScatterChart-svg 364.43 KB
84.49 gz
364.52 KB
84.50 gz
+0.08 KB (+0.0%)
+0.01 gz (+0.0%)
Geo (3 changed)
Scenario Current New Change
🟡 geo-full 457.87 KB
108.59 gz
457.94 KB
108.59 gz
+0.07 KB (+0.0%)
-0.00 gz (-0.0%)
🟡 geo-tiles 405.42 KB
94.88 gz
405.49 KB
94.87 gz
+0.07 KB (+0.0%)
-0.00 gz (-0.0%)
🟡 geo 400.30 KB
93.21 gz
400.38 KB
93.21 gz
+0.07 KB (+0.0%)
-0.00 gz (-0.0%)
Hierarchy (4 changed)
Scenario Current New Change
🟡 hierarchy-tree 393.95 KB
92.17 gz
394.02 KB
92.17 gz
+0.07 KB (+0.0%)
-0.00 gz (-0.0%)
🟡 hierarchy-treemap 390.84 KB
91.38 gz
390.92 KB
91.37 gz
+0.07 KB (+0.0%)
-0.00 gz (-0.0%)
🟡 hierarchy-pack 390.25 KB
91.29 gz
390.32 KB
91.29 gz
+0.07 KB (+0.0%)
+0.00 gz (+0.0%)
🟡 dodge 387.97 KB
90.64 gz
388.05 KB
90.64 gz
+0.07 KB (+0.0%)
0.00 gz (0.0%)
Graph / network (4 changed)
Scenario Current New Change
🟡 dagre 452.77 KB
108.20 gz
452.85 KB
108.21 gz
+0.07 KB (+0.0%)
+0.00 gz (+0.0%)
🟡 force 396.37 KB
93.02 gz
396.44 KB
93.02 gz
+0.07 KB (+0.0%)
-0.00 gz (-0.0%)
🟡 sankey 396.16 KB
92.36 gz
396.23 KB
92.35 gz
+0.07 KB (+0.0%)
-0.00 gz (-0.0%)
🟡 chord 392.84 KB
91.43 gz
392.91 KB
91.43 gz
+0.07 KB (+0.0%)
-0.01 gz (-0.0%)
Components (1 changed)
Scenario Current New Change
🟡 Layer 119.61 KB
28.97 gz
119.68 KB
28.97 gz
+0.07 KB (+0.1%)
-0.00 gz (-0.0%)
Worst case (1 changed)
Scenario Current New Change
🟡 all 1111.64 KB
262.54 gz
1112.21 KB
262.53 gz
+0.57 KB (+0.1%)
-0.01 gz (-0.0%)

Understanding this report
  • Use-case scenarios measure the bundle cost of common chart configurations (e.g. a line chart with axes)
  • Individual components measure each component imported in isolation
  • Svelte runtime is excluded; sizes reflect layerchart + its dependencies (d3, etc.)
  • When multiple components share dependencies (e.g. d3-scale), the real-world cost is lower than the sum of individual sizes
  • Changes smaller than 10 bytes or 0.1% are considered insignificant

@techniq
techniq merged commit 8201112 into main Oct 12, 2026
10 checks passed
@techniq
techniq deleted the techniq/simplified-charts-crash-server-side-when-ssr-is branch October 12, 2026 01:47
@github-actions github-actions Bot mentioned this pull request Oct 12, 2026
renovate Bot added a commit to cigaleapp/cigale that referenced this pull request Oct 19, 2026
##### [v2.7.0](https://github.com/techniq/layerchart/releases/tag/layerchart%402.7.0)

##### Minor Changes

- feat(Axis): Add `domain` to label the chart's scale in other units, such as a secondary axis ([#941](techniq/layerchart#941))

- feat(TooltipItem): Add `seriesKey` to simplify setting the label, color, and value from a series ([#941](techniq/layerchart#941))

##### Patch Changes

- fix(Axis): Only drop the last tick of an `xInterval` / `yInterval` axis when it falls on the domain's end ([#941](techniq/layerchart#941))

- fix(Axis): Label `scaleUtc()` ticks in UTC when no `format` is given ([#941](techniq/layerchart#941))

- fix(BarChart): Place a grouped series in its own sub-band when its `value` is an accessor or a field other than its `key` ([#941](techniq/layerchart#941))

- fix(AreaChart|BarChart|LineChart|ScatterChart|PieChart|ArcChart|Layer): Render server-side with `ssr` instead of overflowing the stack ([#940](techniq/layerchart#940)) ([#943](techniq/layerchart#943))
##### [v2.6.1](https://github.com/techniq/layerchart/releases/tag/layerchart%402.6.1)

##### Patch Changes

- fix(TransformContext): Don't click what a pan, rotate, or pinch is released over ([#936](techniq/layerchart#936))

- fix(Chart): Don't ease an `isometric` view's angles while dragging ([#936](techniq/layerchart#936))

- fix(Chart): Ease an `isometric` view added after the chart was created, starting it at its own angles ([#936](techniq/layerchart#936))
##### [v2.6.0](https://github.com/techniq/layerchart/releases/tag/layerchart%402.6.0)

##### Minor Changes

- feat(Contour): Stroke unfilled contours in the bands' colors when no `stroke` is given ([#934](techniq/layerchart#934))

- feat(Frame|Grid|Axis|Highlight): Draw an `isometric` chart's back walls, their gridlines (`<Grid z>`), a height axis (`<Axis placement="back">`), and highlights at a point's height ([#934](techniq/layerchart#934))

- feat: Support `z` heights on an `isometric` chart — boxes (`Rect`, `Cell`, `Calendar`, `Bars` with `valueAxis="z"`), floating `Circle`, `Text`, `Labels` and `ArcLabel`, `Line` stems, and extruded `Polygon`, `Path`, `GeoPath`, `Contour`, `Pie`, `Area` and `Spline` ([#934](techniq/layerchart#934))

- breaking(Chart|Spline|Area): Rename the `z` grouping channel to `g` (ex. `<Spline g="id">`), freeing `z` for a third position ([#934](techniq/layerchart#934))

- feat(TransformContext): Switch `mode` without remounting the chart ([#934](techniq/layerchart#934))

- feat(Chart): Support `view={isometric}` to draw the plot area as a floor seen at an angle, turned with `isometric({ rotate, tilt })` or by dragging (`transform={{ drag: 'rotate' }}`), with `viewport` text facing the viewer ([#934](techniq/layerchart#934))

- feat(Ellipse): Support `rotate` to turn the ellipse about its center ([#934](techniq/layerchart#934))

##### Patch Changes

- fix(TransformContext): Zoom in / out about the middle of the plot area, and center a `canvas` zoom without resetting its scale ([#934](techniq/layerchart#934))

- fix(GeoPath): Start a tweened map shape as itself rather than rising from a baseline ([#934](techniq/layerchart#934))

- fix(Axis): Size an `angle` axis' ticks by its circle rather than the chart's width, so a continuous angle scale's tick count no longer changes with width (square charts get more ticks) ([#934](techniq/layerchart#934))

- fix(Link): Draw links whose ends share an `x` or `y` ([#934](techniq/layerchart#934))

- fix(BrushContext): Draw and measure the brush through a `canvas` pan / zoom ([#934](techniq/layerchart#934))

- fix(TooltipContext): Account for `transform.mode: 'canvas'` pan / zoom in bisect modes and `'data'` tooltip placement ([#934](techniq/layerchart#934))
##### [v2.5.2](https://github.com/techniq/layerchart/releases/tag/layerchart%402.5.2)

##### Patch Changes

- fix(ArcChart|AreaChart|BarChart|LineChart|PieChart|ScatterChart): Support `bind:ref`, and `bind:context` on the `.svg` / `.canvas` variants ([#930](techniq/layerchart#930)) ([#931](techniq/layerchart#931))

This branch was successfully deployed

1 active deployment
Preview — 79ef87f5 Deployed Oct 12, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplified charts crash server-side when ssr is enabled - snippet name shadows same-named $props() reference (marks/children)

1 participant