Open cammace opened 6 years ago
Oh wow, haha! What cornerRadius did you set?
I have:
<com.robinhood.spark.SparkView
android:id="@+id/sparkview"
android:layout_width="match_parent"
android:layout_height="200dp"
app:spark_lineColor="@color/colorAccent"
app:spark_fillColor="@color/colorAccentTransparent"
app:spark_fillType="down"
app:spark_cornerRadius="15dp"
app:spark_scrubEnabled="true"/>
and am seeing:
Interestingly, we're already manually enclosing the path by going to the bottom right then bottom left. The close()
call only closes from the bottom left back to the first point in the spark. I don't have any immediate ideas on how to fix this, but mostly because I think the solution will be different for different applications.
When we set cornerRadius to a non-zero value,
CornerPathEffect
is applied which works great until you apply a fill to the graph which results in:I think rather than closing the path, if a fill is applied, on line 274 we should manually enclose the path first by hitting the bottom right corner of the view, then bottom left, and finally back to the starting position. I'm also wondering if we could make this paticuliar closing path "invisible" rather than showing the sparkline path closing the graph.