svelte-tiny-linked-charts 2.3.1 → 2.3.2

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.
@@ -192,7 +192,7 @@
192
192
  points.push([i * ((barWidth + gap) + (barWidth / (Object.keys(data).length))), height - getHeight(Object.values(data)[i])])
193
193
  }
194
194
 
195
- points[points.length - 1][0] = width
195
+ if (align === "right") points[points.length - 1][0] = width
196
196
 
197
197
  return points
198
198
  }
@@ -247,7 +247,7 @@
247
247
  <g transform="translate({alignmentOffset}, 0)">
248
248
  {#if type == "line"}
249
249
  {#if lineFill && lineFill !== "transparent"}
250
- <polyline points={[...polyline, [width, height], [0, height]].join(" ")} fill={lineFill} />
250
+ <polyline points={[...polyline, [polyline[polyline.length - 1]?.[0], height], [0, height]].join(" ")} fill={lineFill} />
251
251
  {/if}
252
252
 
253
253
  <polyline points={polyline.join(" ")} stroke={lineColor} stroke-width={lineWidth} fill="transparent" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-tiny-linked-charts",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package",