/** * Returns the Highlight object (contains x-index and DataSet index) of the selected value at the given touch * point * inside the BarChart. * * @param x * @param y * @return */ @Override public Highlight getHighlightByTouchPoint(float x, float y) { if (mData == null) { Log.e(LOG_TAG, "Can't select by touch. No data set."); return null; } else { Highlight h = getHighlighter().getHighlight(x, y); if (h == null || !isHighlightFullBarEnabled()) return h; // For isHighlightFullBarEnabled, remove stackIndex return new Highlight(h.getX(), h.getY(), h.getXPx(), h.getYPx(), h.getDataSetIndex(), -1, h.getAxis()); } }
/** * Returns the Highlight object (contains x-index and DataSet index) of the selected value at the given touch * point * inside the BarChart. * * @param x * @param y * @return */ @Override public Highlight getHighlightByTouchPoint(float x, float y) { if (mData == null) { Log.e(LOG_TAG, "Can't select by touch. No data set."); return null; } else { Highlight h = getHighlighter().getHighlight(x, y); if (h == null || !isHighlightFullBarEnabled()) return h; // For isHighlightFullBarEnabled, remove stackIndex return new Highlight(h.getX(), h.getY(), h.getXPx(), h.getYPx(), h.getDataSetIndex(), -1, h.getAxis()); } }
/** * Returns the Highlight object (contains x-index and DataSet index) of the selected value at the given touch * point * inside the BarChart. * * @param x * @param y * @return */ @Override public Highlight getHighlightByTouchPoint(float x, float y) { if (mData == null) { Log.e(LOG_TAG, "Can't select by touch. No data set."); return null; } else { Highlight h = getHighlighter().getHighlight(x, y); if (h == null || !isHighlightFullBarEnabled()) return h; // For isHighlightFullBarEnabled, remove stackIndex return new Highlight(h.getX(), h.getY(), h.getXPx(), h.getYPx(), h.getDataSetIndex(), -1, h.getAxis()); } }
/** * Returns the Highlight object (contains x-index and DataSet index) of the selected value at the given touch * point * inside the BarChart. * * @param x * @param y * @return */ @Override public Highlight getHighlightByTouchPoint(float x, float y) { if (mData == null) { Log.e(LOG_TAG, "Can't select by touch. No data set."); return null; } else { Highlight h = getHighlighter().getHighlight(x, y); if (h == null || !isHighlightFullBarEnabled()) return h; // For isHighlightFullBarEnabled, remove stackIndex return new Highlight(h.getX(), h.getY(), h.getXPx(), h.getYPx(), h.getDataSetIndex(), -1, h.getAxis()); } }
/** * Returns the Highlight object (contains x-index and DataSet index) of the selected value at the given touch * point * inside the BarChart. * * @param x * @param y * @return */ @Override public Highlight getHighlightByTouchPoint(float x, float y) { if (mData == null) { Log.e(LOG_TAG, "Can't select by touch. No data set."); return null; } else { Highlight h = getHighlighter().getHighlight(x, y); if (h == null || !isHighlightFullBarEnabled()) { return h; } // For isHighlightFullBarEnabled, remove stackIndex return new Highlight(h.getX(), h.getY(), h.getXPx(), h.getYPx(), h.getDataSetIndex(), -1, h.getAxis()); } }