use of com.github.mikephil.charting.data.ScatterData in project MPAndroidChart by PhilJay.
the class ScatterChartRenderer method drawHighlighted.
@Override
public void drawHighlighted(Canvas c, Highlight[] indices) {
ScatterData scatterData = mChart.getScatterData();
for (Highlight high : indices) {
IScatterDataSet set = scatterData.getDataSetByIndex(high.getDataSetIndex());
if (set == null || !set.isHighlightEnabled())
continue;
final Entry e = set.getEntryForXValue(high.getX(), high.getY());
if (!isInBoundsX(e, set))
continue;
MPPointD pix = mChart.getTransformer(set.getAxisDependency()).getPixelForValues(e.getX(), e.getY() * mAnimator.getPhaseY());
high.setDraw((float) pix.x, (float) pix.y);
// draw the lines
drawHighlightLines(c, (float) pix.x, (float) pix.y, set);
}
}
Aggregations