Allows to force minimum slice angles when drawing charts, which means that any
slices with angles lower than the minimum will be drawn with the minimum angle.
When changing this setting on the fly, you have to call
`notifyDataSetChanged()` and `invalidate()` for the minimum angle to take
effect.
This only functions if all slices can be drawn with the minimum angle. For
example if a chart has 5 slices, the largest functioning minimum angle is
`72f` degrees on a 360 degree chart, or 20% of the chart's `maxAngle`.
I created a simplified value formatter class, which is an abstract class rather
than an interface.
The switch was chosen because the new format has all the methods predefined
(something an interface wouldn't allow) meaning you can extend it and only
change what you want. This also means that you only need one value formatting
class for labels rather than two different classes, it just makes more sense.
Please check the method signatures to learn how to use them, I'm sure you'll
find this new format is much more customizable and faster to use.
I've made the class abstract even though there are no abstract methods or
fields, this is because it would certainly be a mistake to create a
ValueFormatter and not override any methods.
To convert existing code, just use 'extends' instead of 'implements' and change
the names to 'ValueFormatter'. You'll need to change the methods you overwrite
as well, just check the class and use the one you need.
I've removed the realm examples, mainly because the library was buggy.
In the previous commit, I already removed the examples from the list
since they didn't add anything to the overall demonstration. I thought
that if anyone wants to use realm.io with the charts, they can see the
actual library.
The file structure has been updated to match how Android Studio does
things. Some files added way back when have been deleted as they don't
do anything but cause the linter to freak out about 'unused properties'
All 'build.gradle' files have been refreshed as well.
Small addition to the README file to add a quick way to reach sections
of the page.
Lots of things in the example app are now marked with the 'final' modifier, and saveToGallery() is protected in classes that implement it. As well, new suppressions are in a few places.
NEW text is now removed completely. Looks like this has been unused for a long time and it's just stuck around anyway.
Before anyone freaks out, all these changes are under-the-hood, meaning that you probably won't even notice them at all.
The biggest difference is raising the minSdkVersion from 9 to 14. Recently android bumped this number interally as there are basically no devices running lower than 14 anymore. Sorry but you are just wasting your time if you are trying to support anything lower than 14 now.
The next biggest change is updating the project to the new AndroidX libraries, which changes some imports and nothing else really.
The third biggest change is fixing a few bugs in the code that cause values to be drawn even if there are none, which results in your app crashing. Surprisingly, these checks already existed in a few of the newer chart types, but most lacked this simple check.
Other than those three changes, nothing else is functionally different. Well, saving to gallery works on all charts in the example app now, and you can quickly see the code for each example in the menus.
The only real potential "breaking" change is that charts are now saved as PNGs by default instead of JPGs if you go the route of not specifying as a JPG. You may want to double check your file sizes as PNGs can be larger than low quality JPGs.
I still have more plans for simplifying the API and fixing other issues with the project, for the small few that closely pay attention to individual commits: there's going to be more soon.
I made the decision to remove this file instead of updating it, as I'm
sure most will instead prefer to look at the actual Easing class. If you
miss this example class... ¯\_(ツ)_/¯
EasingFunction has been simplified greatly, and I've added a MUCH needed
annotation to relevant methods.
Easing.EasingOptions has been deprecated, as well as any methods using
them. Converting is as simple as deleting the "EasingOptions" part.
A new signature is available for animateXY()!
You are now able to pass one EasingFunction to animateXY() if you want
both axes to be animated the same way.
Quietly included are some gradle build updates, incrementing the
appcompat version to 27.1.1, and using the new `javacompiler` to avoid
deprecation of `javacompile`