You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking for a way to hide specific labels on the y axis. I have a y axis values ranging from 0-100. I don't want to show the zero value at all. At the same time I was to make it looks like as if zero value were there. Any help is much appreciated.
The text was updated successfully, but these errors were encountered:
I've had similar issue these days and had to modify the framework's source code. What I did is added in ChartYAxis class a bool value, in your case could be hideFirstValue, then in ChartYAxisRenderer modify drawYLabels method, serch for for i in 0 ..< yAxis.entryCount code, inside of for statment check if yAxis must hide it's first value then if i == 0 then bypass current iteration using continue, this way it won't add label for first value.
for i in 0 ..< yAxis.entryCount {
if yAxis.hideFirstValue {
if i == 0 {
continue
}
}
// the rest of the code
}
Of course instead of bool value you can add an index or an array of indexes, would be more flexible to hide any label you want.
I was looking for a way to hide specific labels on the y axis. I have a y axis values ranging from 0-100. I don't want to show the zero value at all. At the same time I was to make it looks like as if zero value were there. Any help is much appreciated.
The text was updated successfully, but these errors were encountered: