-
-
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
[feature request] support fixed yAxis interval and xAxis labelCount #155
Comments
I actually do not completely understand the requirement... |
At first, I thought setting yAxis.labelCount will lead to setting the 'interval' on yAxis. Take an example, If I set yAxis.labelCount = 3, and the yMax value is 5, I hope there are only 3 labels on the yAxis, like [0,3,6] as the labels. If I set to 6, may be [0,1,2,3,4,5]. However, it turned out that setting yAxis.labelCount will not always get the same count as we want. It will have +1/-1 deviation.
What I want is a 'fixed' count. Setting yAxis.labelCount but results in another count of labels displayed is kind of confusing. |
Well for obvious reasons this number cannot be fixed, and only be approximated. Like any other such calculation... It is also, btw, specified in the docs :-) |
|
I'm not very good with Swift, yet, otherwise I would try tackling it myself. Have you looked at MPAndroidChart feature: Added feature that allows the label-count to be exactly set and evenl... |
It exists already edd9c2e |
Setting yAxis.labelCount will not always get the same count. For example radar chart, if I set the yAxis.labelCount to be 3, I may get 5 label displayed. This is caused by
computeAxisValues(min yMin: Double, max yMax: Double)
has some logic to compute the intervals. This is sometimes confusing since I want to the final labelCount to be same as what I set.Adaptive compue is a very good design, but sometimes people just want that smart. Supporting fixed labelCount for both xAxis and yAxis gives another choice.
The text was updated successfully, but these errors were encountered: