Skip to content
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

Create an image of the entire chart #3037

Closed
sbeff opened this issue Nov 23, 2017 · 3 comments
Closed

Create an image of the entire chart #3037

sbeff opened this issue Nov 23, 2017 · 3 comments

Comments

@sbeff
Copy link

sbeff commented Nov 23, 2017

Hello everyone, I need to create an image of the entire chart like this:
correct
If I use the getChartImage function, I only get an image of the chart that is currently displayed on the screen, like this one:
wrong
Thanks in advance to everyone!
Emanuele

@liuxuan30
Copy link
Member

liuxuan30 commented Nov 24, 2017

I'm confused. You already got what is rendered. For those not showing up, use renderInContext
You should search SO instead...:https://stackoverflow.com/questions/4334233/how-to-capture-uiview-to-uiimage-without-loss-of-quality-on-retina-display

@sbeff
Copy link
Author

sbeff commented Nov 25, 2017

I edited that screenshot, it was not taken with getChartImage function.

@liuxuan30
Copy link
Member

liuxuan30 commented Nov 27, 2017

oh you mean what you shot is not the full data entries?

If you already zoomed and scrolled, NSUIGraphicsGetImageFromCurrentImageContext just takes whatever is on the screen right now

If you want to take the original chart, you have to reset the scale and offset and do it again. Or you manually create another ghost view to use renderInContext render off screen, however this will also take CPU power just like what you rendered on screen, but not showing actually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants