diff --git a/spark/src/main/java/com/robinhood/spark/SparkView.java b/spark/src/main/java/com/robinhood/spark/SparkView.java index ac8935b..9176030 100644 --- a/spark/src/main/java/com/robinhood/spark/SparkView.java +++ b/spark/src/main/java/com/robinhood/spark/SparkView.java @@ -351,10 +351,15 @@ public Path getSparkLinePath() { /** * Set the path to animate in onDraw, used for getAnimation purposes */ - public void setAnimationPath(@NonNull Path animationPath) { + public void setAnimationPath(@NonNull final Path animationPath) { + float fillY = getFillEdge() != null ? getFillEdge() : 0; + this.renderPath.reset(); this.renderPath.addPath(animationPath); - this.renderPath.rLineTo(0, 0); + this.renderPath.rLineTo(0, fillType == FillType.UP ? -getHeight() : fillY); + if (fillType != FillType.NONE) { + this.renderPath.lineTo(0, fillY); + } invalidate(); }