Pre loader

How can I tell if a MajorDelta is going to be shown when AutoRanging?

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

I am considering applying server-side licensing for my javerScript application.

In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)

However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)

I wonder if there is a sample code implemented in C++ for server-side licensing.

Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?

  • You must to post comments
Best Answer
0
0

Hi Stuart,

The AutoTicks feature is a bit simple, and allows basic control over a chart Axis tick frequency output.

If you want fine-grained control e.g. to adaptively change the ticks when zooming, then I suggest looking at the TickProvider feature.

Start by inheriting LogarithmicNumericTickProvider and overriding CalculateMajorTicks. The tickDelta passed in is a structure containing the MajorDelta and MinorDelta. You can control it directly here, then adjust if the output contains no values, e.g.

public class LogarithmicNumericTickProviderEx : LogarithmicNumericTickProvider
{
    protected override double[] CalculateMajorTicks(IRange<double> tickRange, IAxisDelta<double> tickDelta)
    {
        // Try to calculate with MinorDelta = 0.1, MajorDelta = 1
        var altDelta = new DoubleAxisDelta(0.1, 1);
        var result = base.CalculateMajorTicks(tickRange, altDelta);

        // If that fails to give any ticks, try to calculate with the default parameters passed in
        if (result == null || result.Length == 0)
            return base.CalculateMajorTicks(tickRange, tickDelta);

        return result;
    }

    // TODO: Do the same for CalculateMinorTicks
    //       
}

Hope this helps!

Best regards,
Andrew

  • Stuart McCullough
    Thanks Andrew - that'll give me something to play with if they change their minds back to the original requirement again. :-(
  • You must to post comments
Showing 1 result
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