SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

Answered
0
0

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.

Version
3.1.0.5175
  • You must to post comments
Best Answer
1
0

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.

  • apiftechnics api
    Hi; When override methods were not listed by ide-intellisense, I thought I was doing something missing. Thank you for helping.
  • You must to post comments
Great Answer
0
0

Hi there

To access protected methods, just import it using the following line:

import SciChart.Protected.SCIAxisCore

Hope that helps.

Best Regards
Nazar R.

  • You must to post comments
0
0

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.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.