如何获取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)