Pre loader

super.updateTicks() behavior

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

0
0

Hello,

I am having some difficulties using a custom DateTickProvider.

I am trying to offset the values to “anchor” the chart to specific local time (see original question at “https://www.scichart.com/questions/android/axis-value-anchor” for details)

class CustomDateTickProvider() : DateTickProvider() {
    override fun updateTicks(minorTicks: DoubleValues, majorTicks: DoubleValues) {
        // super appears to sometimes recalc based on GMT, and sometimes provide offsets from my previous offsets.
        super.updateTicks(minorTicks, majorTicks) 

       // My offset code here, assumes tick values are GMT based...
    }
}

My code usually works, but sometimes it doesn’t. It appears that when I call super.UpdateTicks(..), it usually generates new ticks based on GMT, but sometimes it simply provides a small offset (like when I pan) based on existing tick values. Is that correct?

Is there a way for me to Force updateTicks to always recalculate based on GMT, or a way for me to tell if updateTicks is recalculating based off GMT or just doing offsets on the existing tick marks?

Or should I be going at this in a different direction?

Thank you.

Version
4.2.0.4557
  • You must to post comments
0
0

Hi there,

Well it’s hard to tell why these offset occur without seeing input data set which is used to calculate ticks. It’s possible that they could be caused by rounding ticks to be divisible by MajorDelta values ( to produce nice looking labels ) calculated by TickProvider or passed from axis.

Unfortunately we don’t have any API to adjust this behavior – the only way is to create custom TickProvider and override algorithm for generation of ticks to produce output which will work for your case.

Best regards,
Yura

  • 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