Hi,
I’m trying to convert Java code to swift and I need the same CustomCategoryDateAxis class as Yura’s answer: https://www.scichart.com/questions/android/setvisiblerangelimitmode-on-xaxis
I try to inherit from SCICategoryDateAxis but there is no isZoomConstrainSatisfied and coerceVisibleRange overrides.
How can i write the same code in swift?
Tnx.
- apiftechnics api asked 4 years ago
- last edited 4 years ago
- You must login to post comments
Hi there,
Please find the code below:
import SciChart.Protected.SCIAxisCore
class CustomCategoryDateAxis: SCICategoryDateAxis {
override func coerceVisibleRange(_ visibleRange: ISCIRange) {
// Do something with visibleRange
}
override func isZoomConstrainSatisfied(_ range: ISCIRange) -> Bool {
return true
}
}
Hope hat helps.
- Nazar Rudnyk answered 4 years ago
-
Hi; When override methods were not listed by ide-intellisense, I thought I was doing something missing. Thank you for helping.
- You must login to post comments
Hi there
To access protected methods, just import it using the following line:
import SciChart.Protected.SCIAxisCore
Hope that helps.
Best Regards
Nazar R.
- Nazar Rudnyk answered 4 years ago
- You must login to post comments
Hi Nazar;
I added SCIAxisCore class to import, but my CustomCategoryDateAxis already inherited from SCICategoryDateAxis…
class CustomCategoryDateAxis: SCICategoryDateAxis
{
}
Can you explain how can i override isZoomConstrainSatisfied or coerceVisibleRange functions?
Tnx.
- apiftechnics api answered 4 years ago
- You must login to post comments
Please login first to submit.