Skip to content

Commit 57b52a9

Browse files
committed
fix(LineChart): Restore passing xScale / yScale overrides
1 parent c84dea5 commit 57b52a9

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/clear-ghosts-arrive.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'layerchart': patch
3+
---
4+
5+
fix(LineChart): Restore passing xScale / yScale overrides

packages/layerchart/src/lib/components/charts/LineChart.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,12 @@
317317
<Chart
318318
bind:context
319319
data={chartData}
320+
{xScale}
320321
x={xProp ?? (isVertical ? series.map((s) => s.value ?? s.key) : undefined)}
321322
{xDomain}
322323
xBaseline={!isVertical || (xScale && isScaleTime(xScale)) ? undefined : 0}
323324
xNice={orientation === 'vertical'}
325+
{yScale}
324326
y={yProp ?? (isVertical ? undefined : series.map((s) => s.value ?? s.key))}
325327
yBaseline={isVertical || (yScale && isScaleTime(yScale)) ? undefined : 0}
326328
yNice={orientation === 'horizontal'}

0 commit comments

Comments
 (0)