mirror of
https://github.com/dzeiocom/charts.git
synced 2025-04-23 19:12:10 +00:00
fix: BarChart text overflowing (#35)
This commit is contained in:
parent
30454becad
commit
73d2d21a7e
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user