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 ?
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 ?
This should do the trick:
XYGraphWidget.LineLabelStyle style = plot.getGraph().getLineLabelStyle(XYGraphWidget.Edge.BOTTOM);
style.getPaint().setTextAlign(Paint.Align.CENTER);
I believe you are doing that on canvas.
(barWidth/2 - textWidth/2) + barLeft
should do, i think.