5calls / android

The Android App of 5 Calls
https://play.google.com/store/apps/details?id=org.a5calls.android.a5calls&rdid=org.a5calls.android.a5calls
MIT License
20 stars 8 forks source link

Generate & share image from stats graph #85

Closed dektar closed 7 years ago

dektar commented 7 years ago

Makes sharing more fun

nickoneill commented 7 years ago

A friend was suggesting that google charts might be a good way to generate these as images rather than using the java-based chart generator we use internally now. Might be applicable in this case as well? cc: @anyercastillo

anyercastillo commented 7 years ago

Static Google Image Charts is deprecated.

While the dynamic and interactive Google Charts are actively maintained, we officially deprecated the static Google Image Charts way back in 2012. This gives us the right to turn it off without notice, although we have no plans to do so.

But I think we should be generating the image outside the client (Android/iOS) that will help us to share the images and keep the client code simple.

Maybe we can add the feature on the backend (https://github.com/wcharczuk/go-chart) and just create a new endpoint that allows clients to create static images like the deprecated Google Image Charts.

I can help creating the endpoint on the backend and writing the Android client.

dektar commented 7 years ago

I actually already wrote this up but haven't pushed it -- I just ask Android to copy the chart view as a bitmap, basically. Doing fancier image generation sounds fine for later; for right now I just want users to be able to get the chart out of the app.

dektar commented 7 years ago

Just pushed it. It isn't super pretty right now but it's functional. The legend is in a funny place.

dektar commented 7 years ago

Closing because this works well enough, although there's still more to do to make it pretty.