com.github.mikephil.charting.charts.BarChart.getBarBounds()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(174)

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

BarChart.getBarBounds介绍

[英]Returns the bounding box of the specified Entry in the specified DataSet. Returns null if the Entry could not be found in the charts data. Performance-intensive code should use void getBarBounds(BarEntry, RectF) instead.
[中]返回指定数据集中指定项的边界框。如果在图表数据中找不到条目,则返回null。性能密集型代码应该改用void getBarBounds(BarEntry,RectF)。

代码示例

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

/**
 * Returns the bounding box of the specified Entry in the specified DataSet. Returns null if the Entry could not be
 * found in the charts data.  Performance-intensive code should use void getBarBounds(BarEntry, RectF) instead.
 *
 * @param e
 * @return
 */
public RectF getBarBounds(BarEntry e) {
  RectF bounds = new RectF();
  getBarBounds(e, bounds);
  return bounds;
}

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

@Override
public void onValueSelected(Entry e, Highlight h) {
  if (e == null)
    return;
  RectF bounds = onValueSelectedRectF;
  chart.getBarBounds((BarEntry) e, bounds);
  MPPointF position = chart.getPosition(e, AxisDependency.LEFT);
  Log.i("bounds", bounds.toString());
  Log.i("position", position.toString());
  Log.i("x-index",
      "low: " + chart.getLowestVisibleX() + ", high: "
          + chart.getHighestVisibleX());
  MPPointF.recycleInstance(position);
}

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

/**
 * Returns the bounding box of the specified Entry in the specified DataSet. Returns null if the Entry could not be
 * found in the charts data.  Performance-intensive code should use void getBarBounds(BarEntry, RectF) instead.
 *
 * @param e
 * @return
 */
public RectF getBarBounds(BarEntry e) {
  RectF bounds = new RectF();
  getBarBounds(e, bounds);
  return bounds;
}

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

/**
 * Returns the bounding box of the specified Entry in the specified DataSet. Returns null if the Entry could not be
 * found in the charts data.  Performance-intensive code should use void getBarBounds(BarEntry, RectF) instead.
 *
 * @param e
 * @return
 */
public RectF getBarBounds(BarEntry e) {
  RectF bounds = new RectF();
  getBarBounds(e, bounds);
  return bounds;
}

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

/**
 * Returns the bounding box of the specified Entry in the specified DataSet. Returns null if the Entry could not be
 * found in the charts data.  Performance-intensive code should use void getBarBounds(BarEntry, RectF) instead.
 *
 * @param e
 * @return
 */
public RectF getBarBounds(BarEntry e) {
  RectF bounds = new RectF();
  getBarBounds(e, bounds);
  return bounds;
}

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

/**
 * Returns the bounding box of the specified Entry in the specified DataSet. Returns null if the Entry could not be
 * found in the charts data.  Performance-intensive code should use void getBarBounds(BarEntry, RectF) instead.
 *
 * @param e
 * @return
 */
public RectF getBarBounds(BarEntry e) {
  RectF bounds = new RectF();
  getBarBounds(e, bounds);
  return bounds;
}

代码示例来源:origin: zhuanghongji/mp-android-chart

@SuppressLint("NewApi")
@Override
public void onValueSelected(Entry e, Highlight h) {
  if (e == null)
    return;
  RectF bounds = mOnValueSelectedRectF;
  mChart.getBarBounds((BarEntry) e, bounds);
  MPPointF position = mChart.getPosition(e, AxisDependency.LEFT);
  Log.i("bounds", bounds.toString());
  Log.i("position", position.toString());
  Log.i("x-index",
      "low: " + mChart.getLowestVisibleX() + ", high: "
          + mChart.getHighestVisibleX());
  MPPointF.recycleInstance(position);
}

相关文章

微信公众号

最新文章

更多