-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draw gradient line in line chart #537
Comments
Currently, no. But it will be a good feature to have. |
In my opinion, ios charts need a more stable internal API and then removal of the |
We need to look into CoreGraphics and see if there's something similar to that shader effect The problem with it though (on Android also!) is that it does not correlate to the colors that you have specified on your yAxis. It advances with the line, but not specifically on the yAxis. I'm guessing that on both platforms it should be much more complex, as we'll need to break this stuff down ourselves and interpolate the colors. Anyway, all the stuff in the renderers is public since v2.2.0! |
Thanks for the info, I am still on v2.1.x and didn't notice this. Good job! Then I believe this issue could be closed. On iOS everything is drawn through |
@danielgindi Do we support such gradient line already? I took some days off, not sure if we can close this. |
Hey do we have any update on the integration of the gradient lines? |
I'm interested in this issue, and I'm doing a chart UI implementation this week with a gradient, and I'll try the CGContextDrawLinearGradient override approach and report back. |
Any update on this? I'm working on a design with line charts using a gradient where the lines simply fades away toward the end. |
@rohinb do you see the PR above? It's not merged yet. But you could give a try, overriding some methods |
any update on this? |
any update on this issue? |
see #649 |
I have created a video tutorial for this task. Kindly refer to my video. |
any update on this? |
this is implemented in 4.0 branch, we are working on 4.0 merge actively, so stay tuned. |
Is it finished now? |
Hi @liuxuan30, In previous version api I can set gradient color, but can't use it now. I got error when I fetch branch 4.0.0 currently. Here's how I did, please help me, I implement in production app and can't work after I try pod install now, thanks! pod 'Charts', :git => 'https://github.com/danielgindi/Charts.git', :branch => '4.0.0' |
have you found any solution? |
I want to draw a gradient line chart like the picture below:
It is a human temperature record. The gradient value follow the temperature, the color guide is the picture below:
In MPAndroidChart, below code will be work:
Did iOS-charts support these feature?
The text was updated successfully, but these errors were encountered: