Pre loader

Custom SCICategoryDateAxis

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

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.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies