Skip to content

Commit 0d8c546

Browse files
committedNov 3, 2020
fix: Bar chart highlight rectangles had inaccurate starting y position.
1 parent cfca469 commit 0d8c546

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@
7070
"@commitlint/config-conventional"
7171
]
7272
}
73-
}
73+
}

‎src/charting/renderer/BarChartRenderer.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,9 @@ export class BarChartRenderer extends BarLineScatterCandleBubbleRenderer {
415415
y2 = range[1];
416416
}
417417
} else {
418+
const minAxisValue = this.mChart.getAxis(set.getAxisDependency()).getAxisMinimum();
418419
y1 = entry[yKey];
419-
y2 = 0;
420+
y2 = minAxisValue >= 0 ? minAxisValue : 0;
420421
}
421422
const x = getEntryXValue(entry, xKey, index);
422423
this.prepareBarHighlight(x, y1, y2, barData.getBarWidth() / 2, trans);

0 commit comments

Comments
 (0)
Please sign in to comment.