robinhood/spark

Custom Line Chart

enes-sakut opened this issue · 1 comments

I want to draw this line chart and I added 3 limit lines.Chart's default color must be grey and if chart lower than 2.limit line chart color is must be green and higher than 3. limit line chart color is must be orange.How can I do that? This is the reference picture.Is it possible this library?
line

Unfortunately, this isn't a direct feature of Spark. You might be able to get this coloring by calling sparkView.setSparkLinePaint() with your own paint that you've set up with a LinearGradient. You'd have to do some math to adjust the LinearGradient to your data set, however as the coordinates of the graph aren't the same as the coordinates of the LinearGradient.