Skip to content

Commit 4490bf9

Browse files
authored
Merge pull request #569 from techniq/highlight-fix-zero
fix(Highlight): Fix display of lines for first values (`0` coord). Fixes #568
2 parents 43cf4f0 + e174069 commit 4490bf9

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.changeset/lovely-loops-ring.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(Highlight): Fix display of lines for first values (`0` coord). Fixes #568

packages/layerchart/src/lib/components/Highlight.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
y2: max(ctx.yRange) as unknown as number,
176176
})),
177177
];
178-
} else if (xCoord) {
178+
} else if (xCoord != null) {
179179
tmpLines = [
180180
...tmpLines,
181181
{
@@ -201,7 +201,7 @@
201201
y2: yItem + yOffset,
202202
})),
203203
];
204-
} else if (yCoord) {
204+
} else if (yCoord != null) {
205205
tmpLines = [
206206
...tmpLines,
207207
{

0 commit comments

Comments
 (0)