Skip to content

Commit

Permalink
优化蜡烛图某个点4中价格一样的显示问题
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyiqian committed Dec 9, 2021
1 parent cdeb835 commit c25325b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,17 @@ open class KChart(
tmpRectF.right = left + barWidth
tmpRectF.bottom = kEntity.getClosePrice()
mapRectValue2Real(tmpRectF)
canvas.drawRect(tmpRectF, candleKChartPaint)
if (tmpRectF.height() == 0f) {
canvas.drawLine(
tmpRectF.left,
tmpRectF.top,
tmpRectF.right,
tmpRectF.bottom,
candleKChartPaint
)
} else {
canvas.drawRect(tmpRectF, candleKChartPaint)
}
}
left += barWidth + spaceWidth
}
Expand Down
2 changes: 1 addition & 1 deletion samples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ dependencies {
implementation 'com.google.android:flexbox:2.0.1'

// implementation project(':lib')
implementation 'com.github.wangyiqian:StockChart:1.0.10'
implementation 'com.github.wangyiqian:StockChart:1.0.11'
}

0 comments on commit c25325b

Please sign in to comment.