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

x33g5p2x  于2022-02-05 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(122)

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

YAxis.isDrawLabelsEnabled介绍

暂无

代码示例

代码示例来源:origin: PhilJay/MPAndroidChart

/**
 * Returns true if this axis needs horizontal offset, false if no offset is needed.
 *
 * @return
 */
public boolean needsOffset() {
  if (isEnabled() && isDrawLabelsEnabled() && getLabelPosition() == YAxisLabelPosition
      .OUTSIDE_CHART)
    return true;
  else
    return false;
}

代码示例来源:origin: PhilJay/MPAndroidChart

public void renderAxisLabels(Canvas c) {
  if (!mYAxis.isEnabled() || !mYAxis.isDrawLabelsEnabled())
    return;

代码示例来源: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

public void renderAxisLabels(Canvas c) {
  if (!mYAxis.isEnabled() || !mYAxis.isDrawLabelsEnabled())
    return;

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

/**
 * Returns true if this axis needs horizontal offset, false if no offset is needed.
 *
 * @return
 */
public boolean needsOffset() {
  return isEnabled() && isDrawLabelsEnabled() && getLabelPosition() == YAxisLabelPosition
      .OUTSIDE_CHART;
}

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

/**
 * Returns true if this axis needs horizontal offset, false if no offset is needed.
 *
 * @return
 */
public boolean needsOffset() {
  if (isEnabled() && isDrawLabelsEnabled() && getLabelPosition() == YAxisLabelPosition
      .OUTSIDE_CHART)
    return true;
  else
    return false;
}

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

/**
 * Returns true if this axis needs horizontal offset, false if no offset is needed.
 *
 * @return
 */
public boolean needsOffset() {
  if (isEnabled() && isDrawLabelsEnabled() && getLabelPosition() == YAxisLabelPosition
      .OUTSIDE_CHART)
    return true;
  else
    return false;
}

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

/**
 * Returns true if this axis needs horizontal offset, false if no offset is needed.
 *
 * @return
 */
public boolean needsOffset() {
  if (isEnabled() && isDrawLabelsEnabled() && getLabelPosition() == YAxisLabelPosition
      .OUTSIDE_CHART)
    return true;
  else
    return false;
}

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

public void renderAxisLabels(Canvas c) {
  if (!mYAxis.isEnabled() || !mYAxis.isDrawLabelsEnabled())
    return;

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

public void renderAxisLabels(Canvas c) {
  if (!mYAxis.isEnabled() || !mYAxis.isDrawLabelsEnabled())
    return;

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

public void renderAxisLabels(Canvas c) {
  if (!mYAxis.isEnabled() || !mYAxis.isDrawLabelsEnabled())
    return;

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

public void renderAxisLabels(Canvas c) {
  if (!mYAxis.isEnabled() || !mYAxis.isDrawLabelsEnabled()) {
    return;

代码示例来源: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: 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: 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: 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: com.github.PhilJay/MPAndroidChart

public void renderAxisLabels(Canvas c) {
  if (!mYAxis.isEnabled() || !mYAxis.isDrawLabelsEnabled())
    return;

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

public void renderAxisLabels(Canvas c) {
  if (!mYAxis.isEnabled() || !mYAxis.isDrawLabelsEnabled())
    return;

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

public void renderAxisLabels(Canvas c) {
  if (!mYAxis.isEnabled() || !mYAxis.isDrawLabelsEnabled()) {
    return;

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

public void renderAxisLabels(Canvas c) {
  if (!mYAxis.isEnabled() || !mYAxis.isDrawLabelsEnabled())
    return;

相关文章

YAxis类方法