Skip to content

Commit dc9dd94

Browse files
committed
fix threshold with linear gradient examples
1 parent 4c0a314 commit dc9dd94

28 files changed

+38
-40
lines changed

docs/src/examples/catalog/Area.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -593,27 +593,27 @@
593593
},
594594
{
595595
"component": "Layer",
596-
"lineNumber": 20,
596+
"lineNumber": 19,
597597
"line": "<Layer>"
598598
},
599599
{
600600
"component": "Axis",
601-
"lineNumber": 21,
601+
"lineNumber": 20,
602602
"line": "<Axis placement=\"left\" grid rule />"
603603
},
604604
{
605605
"component": "Rule",
606-
"lineNumber": 23,
606+
"lineNumber": 22,
607607
"line": "<Rule y={0} />"
608608
},
609609
{
610610
"component": "LinearGradient",
611-
"lineNumber": 24,
611+
"lineNumber": 23,
612612
"line": "<LinearGradient"
613613
},
614614
{
615615
"component": "Area",
616-
"lineNumber": 33,
616+
"lineNumber": 32,
617617
"line": "<Area line={{ stroke: gradient, class: 'stroke-2' }} fill={gradient} fillOpacity={0.2} />"
618618
}
619619
]
@@ -630,27 +630,27 @@
630630
},
631631
{
632632
"component": "Layer",
633-
"lineNumber": 20,
633+
"lineNumber": 19,
634634
"line": "<Layer>"
635635
},
636636
{
637637
"component": "Axis",
638-
"lineNumber": 21,
638+
"lineNumber": 20,
639639
"line": "<Axis placement=\"left\" grid rule />"
640640
},
641641
{
642642
"component": "Rule",
643-
"lineNumber": 23,
643+
"lineNumber": 22,
644644
"line": "<Rule y={0} />"
645645
},
646646
{
647647
"component": "LinearGradient",
648-
"lineNumber": 24,
648+
"lineNumber": 23,
649649
"line": "<LinearGradient"
650650
},
651651
{
652652
"component": "Area",
653-
"lineNumber": 33,
653+
"lineNumber": 32,
654654
"line": "<Area"
655655
}
656656
]
@@ -944,14 +944,14 @@
944944
"example": "threshold-with-lineargradient",
945945
"component": "Area",
946946
"path": "/docs/components/Area/threshold-with-lineargradient",
947-
"lineNumber": 33,
947+
"lineNumber": 32,
948948
"line": "<Area line={{ stroke: gradient, class: 'stroke-2' }} fill={gradient} fillOpacity={0.2} />"
949949
},
950950
{
951951
"example": "threshold-with-lineargradient-over-under",
952952
"component": "Area",
953953
"path": "/docs/components/Area/threshold-with-lineargradient-over-under",
954-
"lineNumber": 33,
954+
"lineNumber": 32,
955955
"line": "<Area"
956956
},
957957
{
@@ -1333,5 +1333,5 @@
13331333
"line": "<Area"
13341334
}
13351335
],
1336-
"updatedAt": "2026-02-07T20:21:31.262Z"
1336+
"updatedAt": "2026-02-09T15:50:50.030Z"
13371337
}

docs/src/examples/catalog/Axis.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,28 +1107,28 @@
11071107
"example": "threshold-with-lineargradient",
11081108
"component": "Area",
11091109
"path": "/docs/components/Area/threshold-with-lineargradient",
1110-
"lineNumber": 21,
1110+
"lineNumber": 20,
11111111
"line": "<Axis placement=\"left\" grid rule />"
11121112
},
11131113
{
11141114
"example": "threshold-with-lineargradient",
11151115
"component": "Area",
11161116
"path": "/docs/components/Area/threshold-with-lineargradient",
1117-
"lineNumber": 22,
1117+
"lineNumber": 21,
11181118
"line": "<Axis placement=\"bottom\" />"
11191119
},
11201120
{
11211121
"example": "threshold-with-lineargradient-over-under",
11221122
"component": "Area",
11231123
"path": "/docs/components/Area/threshold-with-lineargradient-over-under",
1124-
"lineNumber": 21,
1124+
"lineNumber": 20,
11251125
"line": "<Axis placement=\"left\" grid rule />"
11261126
},
11271127
{
11281128
"example": "threshold-with-lineargradient-over-under",
11291129
"component": "Area",
11301130
"path": "/docs/components/Area/threshold-with-lineargradient-over-under",
1131-
"lineNumber": 22,
1131+
"lineNumber": 21,
11321132
"line": "<Axis placement=\"bottom\" />"
11331133
},
11341134
{
@@ -4093,5 +4093,5 @@
40934093
"line": "<Axis placement=\"bottom\" rule />"
40944094
}
40954095
],
4096-
"updatedAt": "2026-02-07T20:21:31.307Z"
4096+
"updatedAt": "2026-02-09T15:50:50.340Z"
40974097
}

docs/src/examples/catalog/Layer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,14 @@
237237
"example": "threshold-with-lineargradient",
238238
"component": "Area",
239239
"path": "/docs/components/Area/threshold-with-lineargradient",
240-
"lineNumber": 20,
240+
"lineNumber": 19,
241241
"line": "<Layer>"
242242
},
243243
{
244244
"example": "threshold-with-lineargradient-over-under",
245245
"component": "Area",
246246
"path": "/docs/components/Area/threshold-with-lineargradient-over-under",
247-
"lineNumber": 20,
247+
"lineNumber": 19,
248248
"line": "<Layer>"
249249
},
250250
{
@@ -3104,5 +3104,5 @@
31043104
"line": "<Layer onpointermove={onPointerMove}>"
31053105
}
31063106
],
3107-
"updatedAt": "2026-02-08T17:35:30.772Z"
3107+
"updatedAt": "2026-02-09T15:50:52.556Z"
31083108
}

docs/src/examples/catalog/LineChart.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@
778778
{
779779
"component": "Spline",
780780
"lineNumber": 36,
781-
"line": "<Spline y=\"value\" {curve} class=\"stroke-success stroke-2\" />"
781+
"line": "<Spline y=\"value\" {curve} class=\"stroke-success\" />"
782782
},
783783
{
784784
"component": "Tooltip",
@@ -1395,5 +1395,5 @@
13951395
"line": "<LineChart {data} x=\"value\" y=\"date\" orientation=\"vertical\" width={400} height={600} />"
13961396
}
13971397
],
1398-
"updatedAt": "2026-02-09T15:39:49.211Z"
1398+
"updatedAt": "2026-02-09T15:50:52.726Z"
13991399
}

docs/src/examples/catalog/LinearGradient.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,14 @@
178178
"example": "threshold-with-lineargradient",
179179
"component": "Area",
180180
"path": "/docs/components/Area/threshold-with-lineargradient",
181-
"lineNumber": 24,
181+
"lineNumber": 23,
182182
"line": "<LinearGradient"
183183
},
184184
{
185185
"example": "threshold-with-lineargradient-over-under",
186186
"component": "Area",
187187
"path": "/docs/components/Area/threshold-with-lineargradient-over-under",
188-
"lineNumber": 24,
188+
"lineNumber": 23,
189189
"line": "<LinearGradient"
190190
},
191191
{
@@ -539,5 +539,5 @@
539539
"line": "<LinearGradient"
540540
}
541541
],
542-
"updatedAt": "2026-02-07T20:21:31.997Z"
542+
"updatedAt": "2026-02-09T15:50:52.902Z"
543543
}

docs/src/examples/catalog/Rule.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,14 +449,14 @@
449449
"example": "threshold-with-lineargradient",
450450
"component": "Area",
451451
"path": "/docs/components/Area/threshold-with-lineargradient",
452-
"lineNumber": 23,
452+
"lineNumber": 22,
453453
"line": "<Rule y={0} />"
454454
},
455455
{
456456
"example": "threshold-with-lineargradient-over-under",
457457
"component": "Area",
458458
"path": "/docs/components/Area/threshold-with-lineargradient-over-under",
459-
"lineNumber": 23,
459+
"lineNumber": 22,
460460
"line": "<Rule y={0} />"
461461
},
462462
{
@@ -698,5 +698,5 @@
698698
"line": "<Rule />"
699699
}
700700
],
701-
"updatedAt": "2026-02-07T20:21:32.259Z"
701+
"updatedAt": "2026-02-09T15:50:53.516Z"
702702
}

docs/src/examples/catalog/Spline.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -872,14 +872,14 @@
872872
"component": "LineChart",
873873
"path": "/docs/components/LineChart/threshold",
874874
"lineNumber": 36,
875-
"line": "<Spline y=\"value\" {curve} class=\"stroke-success stroke-2\" />"
875+
"line": "<Spline y=\"value\" {curve} class=\"stroke-success\" />"
876876
},
877877
{
878878
"example": "threshold",
879879
"component": "LineChart",
880880
"path": "/docs/components/LineChart/threshold",
881881
"lineNumber": 40,
882-
"line": "<Spline y=\"value\" {curve} class=\"stroke-danger stroke-2\" />"
882+
"line": "<Spline y=\"value\" {curve} class=\"stroke-danger\" />"
883883
},
884884
{
885885
"example": "threshold",
@@ -1155,5 +1155,5 @@
11551155
"line": "<Spline curve={config.curve} motion=\"tween\" />"
11561156
}
11571157
],
1158-
"updatedAt": "2026-02-09T15:38:06.925Z"
1158+
"updatedAt": "2026-02-09T15:50:53.621Z"
11591159
}

docs/src/examples/components/Area/threshold-with-lineargradient-over-under.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
<Chart {data} x="date" y="value" yNice padding={20} tooltip={{ mode: 'quadtree-x' }} height={300}>
1616
{#snippet children({ context })}
1717
{@const thresholdValue = 0}
18-
{@const thresholdOffset =
19-
context.yScale(thresholdValue) / (context.height + context.padding.bottom)}
18+
{@const thresholdOffset = context.yScale(thresholdValue) / context.containerHeight}
2019
<Layer>
2120
<Axis placement="left" grid rule />
2221
<Axis placement="bottom" />

docs/src/examples/components/Area/threshold-with-lineargradient.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
<Chart {data} x="date" y="value" yNice padding={20} tooltip={{ mode: 'quadtree-x' }} height={300}>
1616
{#snippet children({ context })}
1717
{@const thresholdValue = 0}
18-
{@const thresholdOffset =
19-
context.yScale(thresholdValue) / (context.height + context.padding.bottom)}
18+
{@const thresholdOffset = context.yScale(thresholdValue) / context.containerHeight}
2019
<Layer>
2120
<Axis placement="left" grid rule />
2221
<Axis placement="bottom" />
-436 Bytes
Loading

0 commit comments

Comments
 (0)