Skip to content

Commit 4bc9846

Browse files
committed
Fix Spline/gradient.threshold example
1 parent f7fe3e3 commit 4bc9846

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

docs/src/examples/components/Spline/gradient-threshold.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99

1010
<Chart {data} x="date" y="value" yNice padding={{ top: 25, left: 16, bottom: 25 }} height={300}>
1111
{#snippet children({ context })}
12-
{@const thresholdOffset =
13-
(context.yScale(50) / (context.height + context.padding.bottom)) * 100 + '%'}
12+
{@const thresholdOffset = (context.yScale(50) / context.containerHeight) * 100 + '%'}
1413
<Layer>
1514
<Axis placement="left" grid rule />
1615
<Axis placement="bottom" rule />

0 commit comments

Comments
 (0)