Skip to content

Commit ad078e5

Browse files
committed
fix: fix candle ohlc display
1 parent e66b486 commit ad078e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/view/CandleBarView.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default class CandleBarView extends ChildrenView {
5252
if (ohlcSize > 2 && ohlcSize % 2 === 1) {
5353
ohlcSize--
5454
}
55-
halfOhlcSize = Math.floor(halfOhlcSize / 2)
55+
halfOhlcSize = Math.floor(ohlcSize / 2)
5656
}
5757
const yAxis = pane.getAxisComponent()
5858
this.eachChildren((visibleData, barSpace) => {
@@ -124,7 +124,7 @@ export default class CandleBarView extends ChildrenView {
124124
{
125125
x: x - barSpace.halfGapBar,
126126
y: openY + ohlcSize > priceY[3] ? priceY[3] - ohlcSize : openY,
127-
width: barSpace.halfGapBar,
127+
width: barSpace.halfGapBar - halfOhlcSize,
128128
height: ohlcSize
129129
},
130130
{

0 commit comments

Comments
 (0)