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`.
Long deprecated Legend constructor and positioning has been removed, it was
replaced with a new way to position the Legend.
The old Easing options have been removed now, accessing them is as easy as
removing the `EasingOption` part, such that the names look like
`Easing.Linear` or `Easing.EaseInOutQuad` now.
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.
- Re-ordered some of the sections
- Simplified some sections
- Reformatted here and there
- Added a few emojis, how cute!
The goal of this change was to hopefully further reduce the amount of
issue support/ question spam. By moving the sections around to show the
more important parts higher up, like usage and documentation links, I
hope this will make it easier for people to find the documentation.
I've updated the issue and pull request templates, again. This time I
looked to the node.js request library for inspiration.
It's no secret that this project has been attracting a LOT of very
low-quality issues. Almost all are asking questions that can be easily
answered if the person looked at the example project or the wiki.
Specifically, the new Support_help.md file.
This file will hopefully bait these low-quality support questions and
reduce the number of opened issues regarding debugging or support
significantly.
I've updated the default ISSUE_TEMPLATE.md to be a copy of Bug_report.md
to force people to read that notice text if they decide to not choose
any of the templates.
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... ¯\_(ツ)_/¯