mMatrix = mChart.getViewPortHandler().refresh(mMatrix, mChart, false);
/** * Returns a recyclable MPPointF instance. * returns the correct translation depending on the provided x and y touch * points * * @param x * @param y * @return */ public MPPointF getTrans(float x, float y) { ViewPortHandler vph = mChart.getViewPortHandler(); float xTrans = x - vph.offsetLeft(); float yTrans = 0f; // check if axis is inverted if (inverted()) { yTrans = -(y - vph.offsetTop()); } else { yTrans = -(mChart.getMeasuredHeight() - y - vph.offsetBottom()); } return MPPointF.getInstance(xTrans, yTrans); }
ViewPortHandler h = mChart.getViewPortHandler();
mMatrix = mChart.getViewPortHandler().refresh(mMatrix, mChart, true);
if ((labelWidth / 2 + position[0]) > mChart.getViewPortHandler().contentRight()) { position[0] = mChart.getViewPortHandler().contentRight() - labelWidth / 2; } else if ((position[0] - labelWidth / 2) < mChart.getViewPortHandler().contentLeft()) {//左出界 position[0] = mChart.getViewPortHandler().contentLeft() + labelWidth / 2; c.drawText(label, position[0], pos + Utils.convertPixelsToDp(mChart.getViewPortHandler().offsetBottom() + 10), mAxisLabelPaint);
performDrag(event); event.recycle(); mMatrix = mChart.getViewPortHandler().refresh(mMatrix, mChart, false);
/** * Returns a recyclable MPPointF instance. * returns the correct translation depending on the provided x and y touch * points * * @param x * @param y * @return */ public MPPointF getTrans(float x, float y) { ViewPortHandler vph = mChart.getViewPortHandler(); float xTrans = x - vph.offsetLeft(); float yTrans = 0f; // check if axis is inverted if (inverted()) { yTrans = -(y - vph.offsetTop()); } else { yTrans = -(mChart.getMeasuredHeight() - y - vph.offsetBottom()); } return MPPointF.getInstance(xTrans, yTrans); }
/** * Returns a recyclable MPPointF instance. * returns the correct translation depending on the provided x and y touch * points * * @param x * @param y * @return */ public MPPointF getTrans(float x, float y) { ViewPortHandler vph = mChart.getViewPortHandler(); float xTrans = x - vph.offsetLeft(); float yTrans = 0f; // check if axis is inverted if (inverted()) { yTrans = -(y - vph.offsetTop()); } else { yTrans = -(mChart.getMeasuredHeight() - y - vph.offsetBottom()); } return MPPointF.getInstance(xTrans, yTrans); }
/** * Returns a recyclable MPPointF instance. * returns the correct translation depending on the provided x and y touch * points * * @param x * @param y * @return */ public MPPointF getTrans(float x, float y) { ViewPortHandler vph = mChart.getViewPortHandler(); float xTrans = x - vph.offsetLeft(); float yTrans = 0f; // check if axis is inverted if (inverted()) { yTrans = -(y - vph.offsetTop()); } else { yTrans = -(mChart.getMeasuredHeight() - y - vph.offsetBottom()); } return MPPointF.getInstance(xTrans, yTrans); }
/** * Returns a recyclable MPPointF instance. * returns the correct translation depending on the provided x and y touch * points * * @param x * @param y * @return */ public MPPointF getTrans(float x, float y) { ViewPortHandler vph = mChart.getViewPortHandler(); float xTrans = x - vph.offsetLeft(); float yTrans = 0f; // check if axis is inverted if (inverted()) { yTrans = -(y - vph.offsetTop()); } else { yTrans = -(mChart.getMeasuredHeight() - y - vph.offsetBottom()); } return MPPointF.getInstance(xTrans, yTrans); }
mMatrix = mChart.getViewPortHandler().refresh(mMatrix, mChart, false);
mMatrix = mChart.getViewPortHandler().refresh(mMatrix, mChart, false);
mMatrix = mChart.getViewPortHandler().refresh(mMatrix, mChart, false);
ViewPortHandler h = mChart.getViewPortHandler();
mMatrix = mChart.getViewPortHandler().refresh(mMatrix, mChart, true);
ViewPortHandler h = mChart.getViewPortHandler();
ViewPortHandler h = mChart.getViewPortHandler();
mMatrix = mChart.getViewPortHandler().refresh(mMatrix, mChart, true);
ViewPortHandler h = mChart.getViewPortHandler();
mMatrix = mChart.getViewPortHandler().refresh(mMatrix, mChart, true);