public void addPoint(double value, boolean isSum, Integer color) { if (!isSum) { suma -= value; super.addPoint(new Point(0, value)); } else { if (points.isEmpty()) { suma = value; } super.addPoint(new Point(0, suma)); } if (color != null) { colors.add(color); } else { colors.add(parentPaint.getColor()); } areSum.add(isSum); }
@Override public void addPoint(Point p) { super.addPoint(p); areSum.add(false); }