-
-
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
Charts 3.0 labelCount bug? #1767
Comments
looks like you don't turn on |
@liuxuan30 Hello, can you try with this example project https://github.com/Asavarkhul/ChartsSampleProject this simply show how we implement it and show directly the bug |
I can' debug your code because you don't have Charts source code. But I do tried it in ChartsDemo - horizontal bar chart, it works I think. Would you try it first? Some thing you could try: Also, I am wrong about labelCount when you set it to 1: it's range is 2 - 25. And: open var labelCount: Int
{
get
{
return _labelCount
}
set
{
_labelCount = newValue
if _labelCount > 25
{
_labelCount = 25
}
if _labelCount < 2
{
_labelCount = 2
}
forceLabelsEnabled = false
}
}
open func setLabelCount(_ count: Int, force: Bool)
{
self.labelCount = count
forceLabelsEnabled = force
} One thing to mention: |
OK I found what's your problem: You should set granularity like to 1, then you only get 1 label |
When we want to display only 1 xAxis label, the labelCount force to show multiple label but we want to display only one line..
For example :
if labelCount = 2 (default minimum value)
But if we force this to 3 for example
Is this behavior a bug? or do we have miss something?
Here is our code :
The text was updated successfully, but these errors were encountered: