layerchart 2.0.0-next.31 → 2.0.0-next.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -103,9 +103,14 @@
103
103
  const scaledX: number = ctx.xScale(xVal);
104
104
  const scaledY: number = ctx.yScale(yVal);
105
105
 
106
+ const x = scaledX + getOffset(scaledX, offsetX, ctx.xScale);
107
+ const y = scaledY + getOffset(scaledY, offsetY, ctx.yScale);
108
+
109
+ const radialPoint = pointRadial(x, y);
110
+
106
111
  return {
107
- x: scaledX + getOffset(scaledX, offsetX, ctx.xScale),
108
- y: scaledY + getOffset(scaledY, offsetY, ctx.yScale),
112
+ x: ctx.radial ? radialPoint[0] : x,
113
+ y: ctx.radial ? radialPoint[1] : y,
109
114
  r: ctx.config.r ? ctx.rGet(d) : r,
110
115
  xValue: xVal,
111
116
  yValue: yVal,
@@ -192,10 +197,9 @@
192
197
  {/if}
193
198
 
194
199
  {#each points as point}
195
- {@const radialPoint = pointRadial(point.x, point.y)}
196
200
  <Circle
197
- cx={ctx.radial ? radialPoint[0] : point.x}
198
- cy={ctx.radial ? radialPoint[1] : point.y}
201
+ cx={point.x}
202
+ cy={point.y}
199
203
  r={point.r}
200
204
  fill={fill ?? (ctx.config.c ? ctx.cGet(point.data) : null)}
201
205
  {fillOpacity}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "author": "Sean Lynch <techniq35@gmail.com>",
5
5
  "license": "MIT",
6
6
  "repository": "techniq/layerchart",
7
- "version": "2.0.0-next.31",
7
+ "version": "2.0.0-next.32",
8
8
  "devDependencies": {
9
9
  "@changesets/cli": "^2.29.4",
10
10
  "@iconify-json/lucide": "^1.2.48",