mirror of
https://github.com/dzeiocom/charts.git
synced 2025-06-13 11:29:19 +00:00
fix: BarChart text overflowing (#35)
This commit is contained in:
@ -147,6 +147,15 @@ class BarSerie(
|
||||
textY = drawableSpace.top + rect.height()
|
||||
}
|
||||
|
||||
if (
|
||||
// check text not overflowing on left side
|
||||
textX + barWidth / 2 > right ||
|
||||
// check text not overflowing on right side
|
||||
textX + barWidth / 2 > drawableSpace.right
|
||||
) {
|
||||
continue
|
||||
}
|
||||
|
||||
canvas.drawText(
|
||||
text,
|
||||
textX,
|
||||
|
Reference in New Issue
Block a user