EPS text filled

This commit is contained in:
Milos Kozak 2021-11-30 22:09:28 +01:00
parent 6ba6cd6edd
commit 5a1d1e1707

View file

@ -273,12 +273,12 @@ public class PointsWithLabelGraphSeries<E extends DataPointWithLabelInterface> e
mPaint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));
Rect bounds = new Rect();
mPaint.getTextBounds(value.getLabel(), 0, value.getLabel().length(), bounds);
mPaint.setStyle(Paint.Style.STROKE);
float px = endX + bounds.height() / 2.0f;
float py = (float) (graphHeight * ratY + bounds.width() + 10);
canvas.save();
canvas.rotate(-90, px, py);
canvas.drawText(value.getLabel(), px, py, mPaint);
mPaint.setStyle(Paint.Style.STROKE);
canvas.drawRect(px - 3, bounds.top + py - 3, bounds.right + px + 3, bounds.bottom + py + 3, mPaint);
canvas.restore();
}