How to fill a path with gradient
I have a graph view that draws a path to some points like this:

now I want to fill the inner area of graph with a gr开发者_开发技巧adient color how can I achieve this ?
Thanks
Edit: @Lumis I added another closed path and set the shader and it was like this:

but there is a gradient color in the outer area of the graph, how can I avoid this ?
This should help you: How to fill a Path in Android with a linear gradient?
You may need to draw two paths one closed for gradient and another one on top with different color for the chart.
If you are having trouble filling a path with the color, this might be some help.
https://github.com/blessenm/LineChartDemo
But here the path is filled with a color. Combining this with the link lumis gave might help you on how to fill it with a gradient.
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论