/**
* draws the y-labels on the specified x-position
*
* @param fixedPosition
* @param positions
*/
@Override
protected void drawYLabels(Canvas c, float fixedPosition, float[] positions, float offset) {
mAxisLabelPaint.setTypeface(mYAxis.getTypeface());
mAxisLabelPaint.setTextSize(mYAxis.getTextSize());
mAxisLabelPaint.setColor(mYAxis.getTextColor());
final int from = mYAxis.isDrawBottomYLabelEntryEnabled() ? 0 : 1;
final int to = mYAxis.isDrawTopYLabelEntryEnabled()
? mYAxis.mEntryCount
: (mYAxis.mEntryCount - 1);
for (int i = from; i < to; i++) {
String text = mYAxis.getFormattedLabel(i);
c.drawText(text, positions[i * 2], fixedPosition - offset, mAxisLabelPaint);
}
}
YAxisRendererHorizontalBarChart.java 文件源码
java
阅读 43
收藏 0
点赞 0
评论 0
项目:GitHub
作者:
评论列表
文章目录