Skip to content

Commit fa12a9c

Browse files
authored
feat(BarChart): Pass derived scales (x1, y1) to slots props. Useful for custom labels with group series layout (#476)
1 parent 9ae3476 commit fa12a9c

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

.changeset/lazy-taxis-hang.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+
feat(BarChart): Pass derived scales (x1, y1) to slots props. Useful for custom labels with group series layout

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,12 @@
329329
bind:tooltipContext
330330
let:x
331331
let:xScale
332+
let:x1
333+
let:x1Scale
334+
let:y1
332335
let:y
333336
let:yScale
337+
let:y1Scale
334338
let:c
335339
let:cScale
336340
let:width
@@ -341,8 +345,12 @@
341345
{@const slotProps = {
342346
x,
343347
xScale,
348+
x1,
349+
x1Scale,
344350
y,
345351
yScale,
352+
y1,
353+
y1Scale,
346354
c,
347355
cScale,
348356
width,

0 commit comments

Comments
 (0)