小编Roc*_* N.的帖子

MPAndroidChart:如何获取像素点对应的图表 x 值?

如何获取ScatterChart中像素点对应的x轴值(xIndex)?

我一直在查看该库的源代码,我认为下面的方法之一(我从此处的库的源代码复制/粘贴可以提供帮助。这似乎getValuesByTouchPoint是正确的方法,但我不知道如何使用它。

/**
* Transformer class that contains all matrices and is responsible for
* transforming values into pixels on the screen and backwards.
*
 * @author Philipp Jahoda
 */
public class Transformer {

/**
 * matrix to map the values to the screen pixels
 */
protected Matrix mMatrixValueToPx = new Matrix();

/**
 * matrix for handling the different offsets of the chart
 */
protected Matrix mMatrixOffset = new Matrix();

protected ViewPortHandler mViewPortHandler;

public Transformer(ViewPortHandler viewPortHandler) …
Run Code Online (Sandbox Code Playgroud)

charts android mpandroidchart

3
推荐指数
1
解决办法
5585
查看次数

标签 统计

android ×1

charts ×1

mpandroidchart ×1