Conversation
When both z and stroke channels are specified, group lines by changes in either channel. Sub-segments share an endpoint with the next sub-segment so multi-colored lines render without gaps. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
✅ Deploy Preview for svelteplot ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-520
# or install the specific version
npm install svelteplot@0.11.1-pr-520.0 |
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-520
# or install the specific version
npm install svelteplot@0.11.1-pr-520.1 |
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-520
# or install the specific version
npm install svelteplot@0.11.1-pr-520.2 |
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-520
# or install the specific version
npm install svelteplot@0.11.1-pr-520.3 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c0450c678
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let Fraw: any[]; | ||
| if (typeof fill === 'function') { | ||
| Fraw = (data as any[]).map(fill as (d: any) => any); | ||
| } else if (fill != null && typeof fill !== 'string') { |
There was a problem hiding this comment.
Handle string fill accessors in dense raster mode
The dense-grid fill extraction excludes string accessors (fill != null && typeof fill !== 'string'), so fill="value" skips accessor resolution and leaves Fraw as the original objects; later color mapping then receives objects instead of scalar values and renders incorrect/transparent pixels. This breaks the documented dense-grid object-data usage (and also misbehaves for constant string fills).
Useful? React with 👍 / 👎.
| const xData = xScale(bx1 + xi * kx); | ||
| const yData = yScale(by1 + yi * ky); |
There was a problem hiding this comment.
Sample function over raster indices without extra scaling
In sampler mode, pixel centers are multiplied by kx/ky before being passed to scales whose domains are already [0,w] and [0,h]. When pixelSize differs from 1 (or explicit width/height changes canvas resolution), this evaluates fill(x,y) outside the requested [x1,x2] × [y1,y2] bounds and distorts sampled outputs.
Useful? React with 👍 / 👎.
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-520
# or install the specific version
npm install svelteplot@0.11.1-pr-520.4 |
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-520
# or install the specific version
npm install svelteplot@0.11.1-pr-520.5 |
… Raster
Two bugs caused `effect_update_depth_exceeded` and NaN pixel coordinates
when combining the Raster mark's function-sampling mode with `aspectRatio`:
1. Reactive oscillation: `height` (from aspectRatio) depended on `plotWidth`
which depended on `autoMarginLeft` (AxisY label widths) which depended on
y-tick count which depended on `plotHeight` → circular. Fixed by introducing
`plotWidthForAspectRatio` that uses only user-specified margins (zero when
set to 'auto'), breaking the feedback cycle.
2. NaN initialization: before any marks mount, x/y domains are empty so
`heightFromAspect` computed `Math.abs(undefined - undefined) = NaN`. Since
NaN is not nullish, this propagated through scale range computation giving
every datum NaN pixel coordinates. Fixed by guarding `heightFromAspect` to
return `DEFAULTS.height` when domains are degenerate or non-finite.
Also adds a test case covering aspectRatio + sampler mode, and updates the
sampled raster example to use aspectRatio={1}.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-520
# or install the specific version
npm install svelteplot@0.11.1-pr-520.6 |
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-520
# or install the specific version
npm install svelteplot@0.11.1-pr-520.7 |
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-520
# or install the specific version
npm install svelteplot@0.11.1-pr-520.8 |
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-520
# or install the specific version
npm install svelteplot@0.11.1-pr-520.9 |
resolves #88
Summary
Rastermark that renders data as an SVG<image>element, mapping values through the color scale onto a pixel gridfillas an(x, y) => valuefunction)rasterInterpolate.tshelper with four interpolation strategies (none, nearest, Delaunay barycentric, random-walk / walk-on-spheres)Linemark: when bothzandstrokechannels are set, lines are now segmented by changes in either channel (multi-colored lines), with sub-segments sharing endpoints to avoid gaps/marks/rasterwith live examples for all three modes, blur, and pixelSizeTest plan
pnpm testpasses (729 tests including new line segmentation test)/marks/rasterdoc page renders correctly with live examples/examples/rastergallery shows all four examplesz+strokechannels produce multi-colored segmented lines🤖 Generated with Claude Code