gpt4 book ai didi

com.github.mikephil.charting.renderer.YAxisRendererHorizontalBarChart类的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 05:50:49 27 4
gpt4 key购买 nike

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

YAxisRendererHorizontalBarChart介绍

暂无

代码示例

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

@Override
protected void init() {
  mViewPortHandler = new HorizontalViewPortHandler();
  super.init();
  mLeftAxisTransformer = new TransformerHorizontalBarChart(mViewPortHandler);
  mRightAxisTransformer = new TransformerHorizontalBarChart(mViewPortHandler);
  mRenderer = new HorizontalBarChartRenderer(this, mAnimator, mViewPortHandler);
  setHighlighter(new HorizontalBarHighlighter(this));
  mAxisRendererLeft = new YAxisRendererHorizontalBarChart(mViewPortHandler, mAxisLeft, mLeftAxisTransformer);
  mAxisRendererRight = new YAxisRendererHorizontalBarChart(mViewPortHandler, mAxisRight, mRightAxisTransformer);
  mXAxisRenderer = new XAxisRendererHorizontalBarChart(mViewPortHandler, mXAxis, mLeftAxisTransformer, this);
}

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

/**
 * Computes the axis values.
 *
 * @param yMin - the minimum y-value in the data object for this axis
 * @param yMax - the maximum y-value in the data object for this axis
 */
@Override
public void computeAxis(float yMin, float yMax, boolean inverted) {
  // calculate the starting and entry point of the y-labels (depending on
  // zoom / contentrect bounds)
  if (mViewPortHandler.contentHeight() > 10 && !mViewPortHandler.isFullyZoomedOutX()) {
    MPPointD p1 = mTrans.getValuesByTouchPoint(mViewPortHandler.contentLeft(),
        mViewPortHandler.contentTop());
    MPPointD p2 = mTrans.getValuesByTouchPoint(mViewPortHandler.contentRight(),
        mViewPortHandler.contentTop());
    if (!inverted) {
      yMin = (float) p1.x;
      yMax = (float) p2.x;
    } else {
      yMin = (float) p2.x;
      yMax = (float) p1.x;
    }
    MPPointD.recycleInstance(p1);
    MPPointD.recycleInstance(p2);
  }
  computeAxisValues(yMin, yMax);
}

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

return;
float[] positions = getTransformedPositions();
drawYLabels(c, yPos, positions, mYAxis.getYOffset());

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

return;
float[] positions = getTransformedPositions();
drawYLabels(c, yPos, positions, mYAxis.getYOffset());

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

@Override
protected void init() {
  mViewPortHandler = new HorizontalViewPortHandler();
  super.init();
  mLeftAxisTransformer = new TransformerHorizontalBarChart(mViewPortHandler);
  mRightAxisTransformer = new TransformerHorizontalBarChart(mViewPortHandler);
  mRenderer = new HorizontalBarChartRenderer(this, mAnimator, mViewPortHandler);
  setHighlighter(new HorizontalBarHighlighter(this));
  mAxisRendererLeft = new YAxisRendererHorizontalBarChart(mViewPortHandler, mAxisLeft, mLeftAxisTransformer);
  mAxisRendererRight = new YAxisRendererHorizontalBarChart(mViewPortHandler, mAxisRight, mRightAxisTransformer);
  mXAxisRenderer = new XAxisRendererHorizontalBarChart(mViewPortHandler, mXAxis, mLeftAxisTransformer, this);
}

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

/**
 * Computes the axis values.
 *
 * @param yMin - the minimum y-value in the data object for this axis
 * @param yMax - the maximum y-value in the data object for this axis
 */
@Override
public void computeAxis(float yMin, float yMax, boolean inverted) {
  // calculate the starting and entry point of the y-labels (depending on
  // zoom / contentrect bounds)
  if (mViewPortHandler.contentHeight() > 10 && !mViewPortHandler.isFullyZoomedOutX()) {
    MPPointD p1 = mTrans.getValuesByTouchPoint(mViewPortHandler.contentLeft(),
        mViewPortHandler.contentTop());
    MPPointD p2 = mTrans.getValuesByTouchPoint(mViewPortHandler.contentRight(),
        mViewPortHandler.contentTop());
    if (!inverted) {
      yMin = (float) p1.x;
      yMax = (float) p2.x;
    } else {
      yMin = (float) p2.x;
      yMax = (float) p1.x;
    }
    MPPointD.recycleInstance(p1);
    MPPointD.recycleInstance(p2);
  }
  computeAxisValues(yMin, yMax);
}

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

float[] positions = getTransformedPositions();
drawYLabels(c, yPos, positions, mYAxis.getYOffset());

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

@Override
protected void init() {
  mViewPortHandler = new HorizontalViewPortHandler();
  super.init();
  mLeftAxisTransformer = new TransformerHorizontalBarChart(mViewPortHandler);
  mRightAxisTransformer = new TransformerHorizontalBarChart(mViewPortHandler);
  mRenderer = new HorizontalBarChartRenderer(this, mAnimator, mViewPortHandler);
  setHighlighter(new HorizontalBarHighlighter(this));
  mAxisRendererLeft = new YAxisRendererHorizontalBarChart(mViewPortHandler, mAxisLeft, mLeftAxisTransformer);
  mAxisRendererRight = new YAxisRendererHorizontalBarChart(mViewPortHandler, mAxisRight, mRightAxisTransformer);
  mXAxisRenderer = new XAxisRendererHorizontalBarChart(mViewPortHandler, mXAxis, mLeftAxisTransformer, this);
}

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

/**
 * Computes the axis values.
 *
 * @param yMin - the minimum y-value in the data object for this axis
 * @param yMax - the maximum y-value in the data object for this axis
 */
@Override
public void computeAxis(float yMin, float yMax, boolean inverted) {
  // calculate the starting and entry point of the y-labels (depending on
  // zoom / contentrect bounds)
  if (mViewPortHandler.contentHeight() > 10 && !mViewPortHandler.isFullyZoomedOutX()) {
    MPPointD p1 = mTrans.getValuesByTouchPoint(mViewPortHandler.contentLeft(),
        mViewPortHandler.contentTop());
    MPPointD p2 = mTrans.getValuesByTouchPoint(mViewPortHandler.contentRight(),
        mViewPortHandler.contentTop());
    if (!inverted) {
      yMin = (float) p1.x;
      yMax = (float) p2.x;
    } else {
      yMin = (float) p2.x;
      yMax = (float) p1.x;
    }
    MPPointD.recycleInstance(p1);
    MPPointD.recycleInstance(p2);
  }
  computeAxisValues(yMin, yMax);
}

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

return;
float[] positions = getTransformedPositions();
drawYLabels(c, yPos, positions, mYAxis.getYOffset());

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

@Override
protected void init() {
  mViewPortHandler = new HorizontalViewPortHandler();
  super.init();
  mLeftAxisTransformer = new TransformerHorizontalBarChart(mViewPortHandler);
  mRightAxisTransformer = new TransformerHorizontalBarChart(mViewPortHandler);
  mRenderer = new HorizontalBarChartRenderer(this, mAnimator, mViewPortHandler);
  setHighlighter(new HorizontalBarHighlighter(this));
  mAxisRendererLeft = new YAxisRendererHorizontalBarChart(mViewPortHandler, mAxisLeft, mLeftAxisTransformer);
  mAxisRendererRight = new YAxisRendererHorizontalBarChart(mViewPortHandler, mAxisRight, mRightAxisTransformer);
  mXAxisRenderer = new XAxisRendererHorizontalBarChart(mViewPortHandler, mXAxis, mLeftAxisTransformer, this);
}

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

/**
 * Computes the axis values.
 *
 * @param yMin - the minimum y-value in the data object for this axis
 * @param yMax - the maximum y-value in the data object for this axis
 */
@Override
public void computeAxis(float yMin, float yMax, boolean inverted) {
  // calculate the starting and entry point of the y-labels (depending on
  // zoom / contentrect bounds)
  if (mViewPortHandler.contentHeight() > 10 && !mViewPortHandler.isFullyZoomedOutX()) {
    MPPointD p1 = mTrans.getValuesByTouchPoint(mViewPortHandler.contentLeft(),
        mViewPortHandler.contentTop());
    MPPointD p2 = mTrans.getValuesByTouchPoint(mViewPortHandler.contentRight(),
        mViewPortHandler.contentTop());
    if (!inverted) {
      yMin = (float) p1.x;
      yMax = (float) p2.x;
    } else {
      yMin = (float) p2.x;
      yMax = (float) p1.x;
    }
    MPPointD.recycleInstance(p1);
    MPPointD.recycleInstance(p2);
  }
  computeAxisValues(yMin, yMax);
}

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

return;
float[] positions = getTransformedPositions();
drawYLabels(c, yPos, positions, mYAxis.getYOffset());

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

@Override
protected void init() {
  mViewPortHandler = new HorizontalViewPortHandler();
  super.init();
  mLeftAxisTransformer = new TransformerHorizontalBarChart(mViewPortHandler);
  mRightAxisTransformer = new TransformerHorizontalBarChart(mViewPortHandler);
  mRenderer = new HorizontalBarChartRenderer(this, mAnimator, mViewPortHandler);
  setHighlighter(new HorizontalBarHighlighter(this));
  mAxisRendererLeft = new YAxisRendererHorizontalBarChart(mViewPortHandler, mAxisLeft, mLeftAxisTransformer);
  mAxisRendererRight = new YAxisRendererHorizontalBarChart(mViewPortHandler, mAxisRight, mRightAxisTransformer);
  mXAxisRenderer = new XAxisRendererHorizontalBarChart(mViewPortHandler, mXAxis, mLeftAxisTransformer, this);
}

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

/**
 * Computes the axis values.
 *
 * @param yMin - the minimum y-value in the data object for this axis
 * @param yMax - the maximum y-value in the data object for this axis
 */
@Override
public void computeAxis(float yMin, float yMax, boolean inverted) {
  // calculate the starting and entry point of the y-labels (depending on
  // zoom / contentrect bounds)
  if (mViewPortHandler.contentHeight() > 10 && !mViewPortHandler.isFullyZoomedOutX()) {
    MPPointD p1 = mTrans.getValuesByTouchPoint(mViewPortHandler.contentLeft(),
        mViewPortHandler.contentTop());
    MPPointD p2 = mTrans.getValuesByTouchPoint(mViewPortHandler.contentRight(),
        mViewPortHandler.contentTop());
    if (!inverted) {
      yMin = (float) p1.x;
      yMax = (float) p2.x;
    } else {
      yMin = (float) p2.x;
      yMax = (float) p1.x;
    }
    MPPointD.recycleInstance(p1);
    MPPointD.recycleInstance(p2);
  }
  computeAxisValues(yMin, yMax);
}

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