Reputation: 4283
Currently, each bar's domain label appears below the left hand side of each bar, as pictured here:
Is there a way to position labels below each bar's center ?
Upvotes: 1
Views: 194
Reputation: 8317
This should do the trick:
XYGraphWidget.LineLabelStyle style = plot.getGraph().getLineLabelStyle(XYGraphWidget.Edge.BOTTOM);
style.getPaint().setTextAlign(Paint.Align.CENTER);
Upvotes: 1
Reputation: 681
I believe you are doing that on canvas.
(barWidth/2 - textWidth/2) + barLeft
should do, i think.Upvotes: 0