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

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

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

YAxis.calculate介绍

暂无

代码示例

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

@Override
protected void calcMinMax() {
  mXAxis.calculate(mData.getXMin(), mData.getXMax());
  // calculate axis range (min / max) according to provided data
  mAxisLeft.calculate(mData.getYMin(AxisDependency.LEFT), mData.getYMax(AxisDependency.LEFT));
  mAxisRight.calculate(mData.getYMin(AxisDependency.RIGHT), mData.getYMax(AxisDependency
      .RIGHT));
}

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

@Override
protected void calcMinMax() {
  super.calcMinMax();
  mYAxis.calculate(mData.getYMin(AxisDependency.LEFT), mData.getYMax(AxisDependency.LEFT));
  mXAxis.calculate(0, mData.getMaxEntryCountSet().getEntryCount());
}

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

@Override
protected void calcMinMax() {
  if (mFitBars) {
    mXAxis.calculate(mData.getXMin() - mData.getBarWidth() / 2f, mData.getXMax() + mData.getBarWidth() / 2f);
  } else {
    mXAxis.calculate(mData.getXMin(), mData.getXMax());
  }
  // calculate axis range (min / max) according to provided data
  mAxisLeft.calculate(mData.getYMin(YAxis.AxisDependency.LEFT), mData.getYMax(YAxis.AxisDependency.LEFT));
  mAxisRight.calculate(mData.getYMin(YAxis.AxisDependency.RIGHT), mData.getYMax(YAxis.AxisDependency
      .RIGHT));
}

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

/**
 * Performs auto scaling of the axis by recalculating the minimum and maximum y-values based on the entries currently in view.
 */
protected void autoScale() {
  final float fromX = getLowestVisibleX();
  final float toX = getHighestVisibleX();
  mData.calcMinMaxY(fromX, toX);
  mXAxis.calculate(mData.getXMin(), mData.getXMax());
  // calculate axis range (min / max) according to provided data
  if (mAxisLeft.isEnabled())
    mAxisLeft.calculate(mData.getYMin(AxisDependency.LEFT),
        mData.getYMax(AxisDependency.LEFT));
  if (mAxisRight.isEnabled())
    mAxisRight.calculate(mData.getYMin(AxisDependency.RIGHT),
        mData.getYMax(AxisDependency.RIGHT));
  calculateOffsets();
}

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

@Override
protected void calcMinMax() {
  mXAxis.calculate(mData.getXMin(), mData.getXMax());
  // calculate axis range (min / max) according to provided data
  mAxisLeft.calculate(mData.getYMin(AxisDependency.LEFT), mData.getYMax(AxisDependency.LEFT));
  mAxisRight.calculate(mData.getYMin(AxisDependency.RIGHT), mData.getYMax(AxisDependency
      .RIGHT));
}

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

@Override
protected void calcMinMax() {
  mXAxis.calculate(mData.getXMin(), mData.getXMax());
  // calculate axis range (min / max) according to provided data
  mAxisLeft.calculate(mData.getYMin(AxisDependency.LEFT), mData.getYMax(AxisDependency.LEFT));
  mAxisRight.calculate(mData.getYMin(AxisDependency.RIGHT), mData.getYMax(AxisDependency
      .RIGHT));
}

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

@Override
protected void calcMinMax() {
  mXAxis.calculate(mData.getXMin(), mData.getXMax());
  // calculate axis range (min / max) according to provided data
  mAxisLeft.calculate(mData.getYMin(AxisDependency.LEFT), mData.getYMax(AxisDependency.LEFT));
  mAxisRight.calculate(mData.getYMin(AxisDependency.RIGHT), mData.getYMax(AxisDependency
      .RIGHT));
}

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

@Override
protected void calcMinMax() {
  mXAxis.calculate(mData.getXMin(), mData.getXMax());
  // calculate axis range (min / max) according to provided data
  mAxisLeft.calculate(mData.getYMin(AxisDependency.LEFT), mData.getYMax(AxisDependency.LEFT));
  mAxisRight.calculate(mData.getYMin(AxisDependency.RIGHT), mData.getYMax(AxisDependency
      .RIGHT));
}

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

@Override
protected void calcMinMax() {
  super.calcMinMax();
  mYAxis.calculate(mData.getYMin(AxisDependency.LEFT), mData.getYMax(AxisDependency.LEFT));
  mXAxis.calculate(0, mData.getMaxEntryCountSet().getEntryCount());
}

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

@Override
protected void calcMinMax() {
  if (mFitBars) {
    mXAxis.calculate(mData.getXMin() - mData.getBarWidth() / 2f, mData.getXMax() + mData.getBarWidth() / 2f);
  } else {
    mXAxis.calculate(mData.getXMin(), mData.getXMax());
  }
  // calculate axis range (min / max) according to provided data
  mAxisLeft.calculate(mData.getYMin(YAxis.AxisDependency.LEFT), mData.getYMax(YAxis.AxisDependency.LEFT));
  mAxisRight.calculate(mData.getYMin(YAxis.AxisDependency.RIGHT), mData.getYMax(YAxis.AxisDependency
      .RIGHT));
}

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

@Override
protected void calcMinMax() {
  if (mFitBars) {
    mXAxis.calculate(mData.getXMin() - mData.getBarWidth() / 2f, mData.getXMax() + mData.getBarWidth() / 2f);
  } else {
    mXAxis.calculate(mData.getXMin(), mData.getXMax());
  }
  // calculate axis range (min / max) according to provided data
  mAxisLeft.calculate(mData.getYMin(YAxis.AxisDependency.LEFT), mData.getYMax(YAxis.AxisDependency.LEFT));
  mAxisRight.calculate(mData.getYMin(YAxis.AxisDependency.RIGHT), mData.getYMax(YAxis.AxisDependency
      .RIGHT));
}

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

@Override
protected void calcMinMax() {
  if (mFitBars) {
    mXAxis.calculate(mData.getXMin() - mData.getBarWidth() / 2f, mData.getXMax() + mData.getBarWidth() / 2f);
  } else {
    mXAxis.calculate(mData.getXMin(), mData.getXMax());
  }
  // calculate axis range (min / max) according to provided data
  mAxisLeft.calculate(mData.getYMin(YAxis.AxisDependency.LEFT), mData.getYMax(YAxis.AxisDependency.LEFT));
  mAxisRight.calculate(mData.getYMin(YAxis.AxisDependency.RIGHT), mData.getYMax(YAxis.AxisDependency
      .RIGHT));
}

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

@Override
protected void calcMinMax() {
  super.calcMinMax();
  mYAxis.calculate(mData.getYMin(AxisDependency.LEFT), mData.getYMax(AxisDependency.LEFT));
  mXAxis.calculate(0, mData.getMaxEntryCountSet().getEntryCount());
}

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

@Override
protected void calcMinMax() {
  if (mFitBars) {
    mXAxis.calculate(mData.getXMin() - mData.getBarWidth() / 2f, mData.getXMax() + mData.getBarWidth() / 2f);
  } else {
    mXAxis.calculate(mData.getXMin(), mData.getXMax());
  }
  // calculate axis range (min / max) according to provided data
  mAxisLeft.calculate(mData.getYMin(YAxis.AxisDependency.LEFT), mData.getYMax(YAxis.AxisDependency.LEFT));
  mAxisRight.calculate(mData.getYMin(YAxis.AxisDependency.RIGHT), mData.getYMax(YAxis.AxisDependency
      .RIGHT));
}

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

@Override
protected void calcMinMax() {
  super.calcMinMax();
  mYAxis.calculate(mData.getYMin(AxisDependency.LEFT), mData.getYMax(AxisDependency.LEFT));
  mXAxis.calculate(0, mData.getMaxEntryCountSet().getEntryCount());
}

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

@Override
protected void calcMinMax() {
  super.calcMinMax();
  mYAxis.calculate(mData.getYMin(AxisDependency.LEFT), mData.getYMax(AxisDependency.LEFT));
  mXAxis.calculate(0, mData.getMaxEntryCountSet().getEntryCount());
}

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

/**
 * Performs auto scaling of the axis by recalculating the minimum and maximum y-values based on the entries currently in view.
 */
protected void autoScale() {
  final float fromX = getLowestVisibleX();
  final float toX = getHighestVisibleX();
  mData.calcMinMaxY(fromX, toX);
  mXAxis.calculate(mData.getXMin(), mData.getXMax());
  // calculate axis range (min / max) according to provided data
  if (mAxisLeft.isEnabled())
    mAxisLeft.calculate(mData.getYMin(AxisDependency.LEFT),
        mData.getYMax(AxisDependency.LEFT));
  if (mAxisRight.isEnabled())
    mAxisRight.calculate(mData.getYMin(AxisDependency.RIGHT),
        mData.getYMax(AxisDependency.RIGHT));
  calculateOffsets();
}

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

/**
 * Performs auto scaling of the axis by recalculating the minimum and maximum y-values based on the entries currently in view.
 */
protected void autoScale() {
  final float fromX = getLowestVisibleX();
  final float toX = getHighestVisibleX();
  mData.calcMinMaxY(fromX, toX);
  mXAxis.calculate(mData.getXMin(), mData.getXMax());
  // calculate axis range (min / max) according to provided data
  if (mAxisLeft.isEnabled()) {
    mAxisLeft.calculate(mData.getYMin(AxisDependency.LEFT),
        mData.getYMax(AxisDependency.LEFT));
  }
  if (mAxisRight.isEnabled()) {
    mAxisRight.calculate(mData.getYMin(AxisDependency.RIGHT),
        mData.getYMax(AxisDependency.RIGHT));
  }
  calculateOffsets();
}

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

/**
 * Performs auto scaling of the axis by recalculating the minimum and maximum y-values based on the entries currently in view.
 */
protected void autoScale() {
  final float fromX = getLowestVisibleX();
  final float toX = getHighestVisibleX();
  mData.calcMinMaxY(fromX, toX);
  mXAxis.calculate(mData.getXMin(), mData.getXMax());
  // calculate axis range (min / max) according to provided data
  if (mAxisLeft.isEnabled())
    mAxisLeft.calculate(mData.getYMin(AxisDependency.LEFT),
        mData.getYMax(AxisDependency.LEFT));
  if (mAxisRight.isEnabled())
    mAxisRight.calculate(mData.getYMin(AxisDependency.RIGHT),
        mData.getYMax(AxisDependency.RIGHT));
  calculateOffsets();
}

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

/**
 * Performs auto scaling of the axis by recalculating the minimum and maximum y-values based on the entries currently in view.
 */
protected void autoScale() {
  final float fromX = getLowestVisibleX();
  final float toX = getHighestVisibleX();
  mData.calcMinMaxY(fromX, toX);
  mXAxis.calculate(mData.getXMin(), mData.getXMax());
  // calculate axis range (min / max) according to provided data
  if (mAxisLeft.isEnabled())
    mAxisLeft.calculate(mData.getYMin(AxisDependency.LEFT),
        mData.getYMax(AxisDependency.LEFT));
  if (mAxisRight.isEnabled())
    mAxisRight.calculate(mData.getYMin(AxisDependency.RIGHT),
        mData.getYMax(AxisDependency.RIGHT));
  calculateOffsets();
}

相关文章

YAxis类方法