values.add(new PointValue(value));
if (Float.isNaN(point.getValue())) { continue; float yPosition = (max - point.getValue()) / (max - min) * mContentRect.height(); point.setCoordinate(xPosition, yPosition); if (prevValue.getValue() > lineDataSet.getShaderBaseValue()) { if (point.getValue() <= lineDataSet.getShaderBaseValue()) { shaderPath.lineTo(point.getX(), baseValueY); shaderPath.lineTo(startPoint.getX(), baseValueY); shaderPath.lineTo(startPoint.getX(), startPoint.getY()); if (point.getValue() > lineDataSet.getShaderBaseValue()) { shaderPath.lineTo(point.getX(), baseValueY); shaderPath.lineTo(startPoint.getX(), baseValueY); shaderPath.lineTo(startPoint.getX(), startPoint.getY()); shaderPath.lineTo(lineDataSet.getValues().get(lastIndex).getX(), baseValueY); shaderPath.lineTo(startPoint.getX(), baseValueY); shaderPath.lineTo(startPoint.getX(), startPoint.getY()); shaderPath.close(); shaderPaths.add(new Path(shaderPath)); if (prevValue.getValue() > baseValue) { shaderPathColors.add(lineDataSet.getShaderTop()); } else {
@Override public void touch(float x, float y) { if (chart.isHighlightDisable()) return; synchronized (chart) { for (LineDataSet line : getDataSet()) { if (line.isHighlightedVerticalEnable() && !line.getValues().isEmpty()) { highlight.setTouchX(x); highlight.setTouchY(y); int offset = line.getStartIndexOffset(); int index = getEntryIndexByCoordinate(x, y) - offset; if (index > 0 && index < line.getValues().size()) { final PointValue pointValue = line.getEntryForIndex(index); float xPosition = pointValue.getX(); float yPosition = pointValue.getY(); if (xPosition >= 0 && yPosition >= 0) { highlight.setX(xPosition); highlight.setY(yPosition); highlight.setDataIndex(index); chart.highlightValue(highlight); } } } } } } });
values.add(new PointValue(value));
values.add(new PointValue(value));