gpt4 book ai didi

com.github.mikephil.charting.components.YAxis.getTypeface()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 07:06:40 24 4
gpt4 key购买 nike

本文整理了Java中com.github.mikephil.charting.components.YAxis.getTypeface()方法的一些代码示例,展示了YAxis.getTypeface()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YAxis.getTypeface()方法的具体详情如下:
包路径:com.github.mikephil.charting.components.YAxis
类名称:YAxis
方法名:getTypeface

YAxis.getTypeface介绍

暂无

代码示例

代码示例来源: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.setTypeface(mYAxis.getTypeface());
mAxisLabelPaint.setTextSize(mYAxis.getTextSize());
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.setTypeface(mYAxis.getTypeface());
mAxisLabelPaint.setTextSize(mYAxis.getTextSize());
mAxisLabelPaint.setColor(mYAxis.getTextColor());

代码示例来源: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.setTypeface(mYAxis.getTypeface());
mAxisLabelPaint.setTextSize(mYAxis.getTextSize());
mAxisLabelPaint.setColor(mYAxis.getTextColor());

代码示例来源:origin: xiaolongonly/Ticket-Analysis

mAxisLabelPaint.setTypeface(mYAxis.getTypeface());
mAxisLabelPaint.setTextSize(mYAxis.getTextSize());
mAxisLabelPaint.setColor(mYAxis.getTextColor());

代码示例来源:origin: WenWangAndroid/ChartManager

mAxisLabelPaint.setTypeface(mYAxis.getTypeface());
mAxisLabelPaint.setTextSize(mYAxis.getTextSize());
mAxisLabelPaint.setColor(mYAxis.getTextColor());

代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart

mAxisLabelPaint.setTypeface(mYAxis.getTypeface());
mAxisLabelPaint.setTextSize(mYAxis.getTextSize());
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.setTypeface(mYAxis.getTypeface());
mAxisLabelPaint.setTextSize(mYAxis.getTextSize());
mAxisLabelPaint.setColor(mYAxis.getTextColor());

代码示例来源:origin: com.github.PhilJay/MPAndroidChart

mAxisLabelPaint.setTypeface(mYAxis.getTypeface());
mAxisLabelPaint.setTextSize(mYAxis.getTextSize());
mAxisLabelPaint.setColor(mYAxis.getTextColor());

代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart

mAxisLabelPaint.setTypeface(mYAxis.getTypeface());
mAxisLabelPaint.setTextSize(mYAxis.getTextSize());
mAxisLabelPaint.setColor(mYAxis.getTextColor());

代码示例来源:origin: xiaolongonly/Ticket-Analysis

mAxisLabelPaint.setTypeface(mYAxis.getTypeface());
mAxisLabelPaint.setTextSize(mYAxis.getTextSize());
mAxisLabelPaint.setColor(mYAxis.getTextColor());

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com