本文整理了Java中com.github.mikephil.charting.components.YAxis.getTextColor()
方法的一些代码示例,展示了YAxis.getTextColor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YAxis.getTextColor()
方法的具体详情如下:
包路径:com.github.mikephil.charting.components.YAxis
类名称:YAxis
方法名:getTextColor
暂无
代码示例来源:origin: PhilJay/MPAndroidChart
/**
* 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);
}
}
代码示例来源:origin: PhilJay/MPAndroidChart
mAxisLabelPaint.setColor(mYAxis.getTextColor());
代码示例来源:origin: PhilJay/MPAndroidChart
@Override
public void renderAxisLabels(Canvas c) {
if (!mYAxis.isEnabled() || !mYAxis.isDrawLabelsEnabled())
return;
mAxisLabelPaint.setTypeface(mYAxis.getTypeface());
mAxisLabelPaint.setTextSize(mYAxis.getTextSize());
mAxisLabelPaint.setColor(mYAxis.getTextColor());
MPPointF center = mChart.getCenterOffsets();
MPPointF pOut = MPPointF.getInstance(0,0);
float factor = mChart.getFactor();
final int from = mYAxis.isDrawBottomYLabelEntryEnabled() ? 0 : 1;
final int to = mYAxis.isDrawTopYLabelEntryEnabled()
? mYAxis.mEntryCount
: (mYAxis.mEntryCount - 1);
for (int j = from; j < to; j++) {
float r = (mYAxis.mEntries[j] - mYAxis.mAxisMinimum) * factor;
Utils.getPosition(center, r, mChart.getRotationAngle(), pOut);
String label = mYAxis.getFormattedLabel(j);
c.drawText(label, pOut.x + 10, pOut.y, mAxisLabelPaint);
}
MPPointF.recycleInstance(center);
MPPointF.recycleInstance(pOut);
}
代码示例来源:origin: PhilJay/MPAndroidChart
mAxisLabelPaint.setColor(mYAxis.getTextColor());
mAxisLabelPaint.setTextAlign(Align.CENTER);
代码示例来源:origin: com.github.PhilJay/MPAndroidChart
/**
* 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);
}
}
代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart
/**
* 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);
}
}
代码示例来源:origin: xiaolongonly/Ticket-Analysis
/**
* 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);
}
}
代码示例来源:origin: WenWangAndroid/ChartManager
/**
* 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);
}
}
代码示例来源:origin: com.github.PhilJay/MPAndroidChart
mAxisLabelPaint.setColor(mYAxis.getTextColor());
代码示例来源:origin: xiaolongonly/Ticket-Analysis
mAxisLabelPaint.setColor(mYAxis.getTextColor());
代码示例来源:origin: WenWangAndroid/ChartManager
mAxisLabelPaint.setColor(mYAxis.getTextColor());
代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart
mAxisLabelPaint.setColor(mYAxis.getTextColor());
代码示例来源:origin: WenWangAndroid/ChartManager
@Override
public void renderAxisLabels(Canvas c) {
if (!mYAxis.isEnabled() || !mYAxis.isDrawLabelsEnabled())
return;
mAxisLabelPaint.setTypeface(mYAxis.getTypeface());
mAxisLabelPaint.setTextSize(mYAxis.getTextSize());
mAxisLabelPaint.setColor(mYAxis.getTextColor());
MPPointF center = mChart.getCenterOffsets();
MPPointF pOut = MPPointF.getInstance(0,0);
float factor = mChart.getFactor();
final int from = mYAxis.isDrawBottomYLabelEntryEnabled() ? 0 : 1;
final int to = mYAxis.isDrawTopYLabelEntryEnabled()
? mYAxis.mEntryCount
: (mYAxis.mEntryCount - 1);
for (int j = from; j < to; j++) {
float r = (mYAxis.mEntries[j] - mYAxis.mAxisMinimum) * factor;
Utils.getPosition(center, r, mChart.getRotationAngle(), pOut);
String label = mYAxis.getFormattedLabel(j);
c.drawText(label, pOut.x + 10, pOut.y, mAxisLabelPaint);
}
MPPointF.recycleInstance(center);
MPPointF.recycleInstance(pOut);
}
代码示例来源:origin: xiaolongonly/Ticket-Analysis
@Override
public void renderAxisLabels(Canvas c) {
if (!mYAxis.isEnabled() || !mYAxis.isDrawLabelsEnabled())
return;
mAxisLabelPaint.setTypeface(mYAxis.getTypeface());
mAxisLabelPaint.setTextSize(mYAxis.getTextSize());
mAxisLabelPaint.setColor(mYAxis.getTextColor());
MPPointF center = mChart.getCenterOffsets();
MPPointF pOut = MPPointF.getInstance(0,0);
float factor = mChart.getFactor();
final int from = mYAxis.isDrawBottomYLabelEntryEnabled() ? 0 : 1;
final int to = mYAxis.isDrawTopYLabelEntryEnabled()
? mYAxis.mEntryCount
: (mYAxis.mEntryCount - 1);
for (int j = from; j < to; j++) {
float r = (mYAxis.mEntries[j] - mYAxis.mAxisMinimum) * factor;
Utils.getPosition(center, r, mChart.getRotationAngle(), pOut);
String label = mYAxis.getFormattedLabel(j);
c.drawText(label, pOut.x + 10, pOut.y, mAxisLabelPaint);
}
MPPointF.recycleInstance(center);
MPPointF.recycleInstance(pOut);
}
代码示例来源:origin: com.github.PhilJay/MPAndroidChart
@Override
public void renderAxisLabels(Canvas c) {
if (!mYAxis.isEnabled() || !mYAxis.isDrawLabelsEnabled())
return;
mAxisLabelPaint.setTypeface(mYAxis.getTypeface());
mAxisLabelPaint.setTextSize(mYAxis.getTextSize());
mAxisLabelPaint.setColor(mYAxis.getTextColor());
MPPointF center = mChart.getCenterOffsets();
MPPointF pOut = MPPointF.getInstance(0,0);
float factor = mChart.getFactor();
final int from = mYAxis.isDrawBottomYLabelEntryEnabled() ? 0 : 1;
final int to = mYAxis.isDrawTopYLabelEntryEnabled()
? mYAxis.mEntryCount
: (mYAxis.mEntryCount - 1);
for (int j = from; j < to; j++) {
float r = (mYAxis.mEntries[j] - mYAxis.mAxisMinimum) * factor;
Utils.getPosition(center, r, mChart.getRotationAngle(), pOut);
String label = mYAxis.getFormattedLabel(j);
c.drawText(label, pOut.x + 10, pOut.y, mAxisLabelPaint);
}
MPPointF.recycleInstance(center);
MPPointF.recycleInstance(pOut);
}
代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart
@Override
public void renderAxisLabels(Canvas c) {
if (!mYAxis.isEnabled() || !mYAxis.isDrawLabelsEnabled()) {
return;
}
mAxisLabelPaint.setTypeface(mYAxis.getTypeface());
mAxisLabelPaint.setTextSize(mYAxis.getTextSize());
mAxisLabelPaint.setColor(mYAxis.getTextColor());
MPPointF center = mChart.getCenterOffsets();
MPPointF pOut = MPPointF.getInstance(0, 0);
float factor = mChart.getFactor();
final int from = mYAxis.isDrawBottomYLabelEntryEnabled() ? 0 : 1;
final int to = mYAxis.isDrawTopYLabelEntryEnabled()
? mYAxis.mEntryCount
: (mYAxis.mEntryCount - 1);
for (int j = from; j < to; j++) {
float r = (mYAxis.mEntries[j] - mYAxis.mAxisMinimum) * factor;
Utils.getPosition(center, r, mChart.getRotationAngle(), pOut);
String label = mYAxis.getFormattedLabel(j);
c.drawText(label, pOut.x + 10, pOut.y, mAxisLabelPaint);
}
MPPointF.recycleInstance(center);
MPPointF.recycleInstance(pOut);
}
代码示例来源:origin: WenWangAndroid/ChartManager
mAxisLabelPaint.setColor(mYAxis.getTextColor());
mAxisLabelPaint.setTextAlign(Align.CENTER);
代码示例来源:origin: com.github.PhilJay/MPAndroidChart
mAxisLabelPaint.setColor(mYAxis.getTextColor());
mAxisLabelPaint.setTextAlign(Align.CENTER);
代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart
mAxisLabelPaint.setColor(mYAxis.getTextColor());
mAxisLabelPaint.setTextAlign(Align.CENTER);
代码示例来源:origin: xiaolongonly/Ticket-Analysis
mAxisLabelPaint.setColor(mYAxis.getTextColor());
mAxisLabelPaint.setTextAlign(Align.CENTER);
内容来源于网络,如有侵权,请联系作者删除!