Pre loader

DateTimeNumericAxis breaks on some ranges

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
1
0

It seems to me that DateTimeNumericAxis has edge cases where it can’t calculate deltas for some ranges.
This results in a console error, and the chart not loading:

Error from chart in div date-axis-bug RangeError: Maximum call stack size exceeded
at get minTicks [as minTicks] (index.min.js:1:577149)
at a (index.min.js:1:577393)
at a (index.min.js:1:577567)
at a (index.min.js:1:577483)
at a (index.min.js:1:577567)
at a (index.min.js:1:577483)
at a (index.min.js:1:577567)
at a (index.min.js:1:577483)
at a (index.min.js:1:577567)
at a (index.min.js:1:577483)

Provided codepen: https://codepen.io/jrfv/pen/xxQawom

Any suggestions?
Thanks!

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

Hi

The fix for this is now live in version 3.2.442. You might get 3, or 11 ticks depending on exactly when it gives up, but you will get a helpful warning in console.

Regards
David

  • You must to post comments
1
0

Hi

So, it does appear you have found a value that oscillates between two possible deltas. It’s easy to escape from this by just increasing the maxAutoTicks on the x axis eg
xAxis.maxAutoTicks = 15;
Alternatively you can set a different possibleDeltas list with some extra entries.

That said, I will add some better detection of this scenario to the function so it returns something without crashing, and print a console warning that it could not find an ideal value, with a suggestion to try the above.

Thanks again for the excellent codepen that made solving this easy.

Regards
David

  • You must to post comments
1
0

No worries, I got to this range completely by chance, so even though it might be rare, I’m afraid it might happen, rendering my charts unusable.

I’ll work on detection on my end, to try and recover from it, while waiting on a new version that won’t crash the chart.

Thank you for the quick responses!

Best Regards,

  • You must to post comments
1
0

Thank you so much David, I updated the codepen, and indeed it works.
I’m not so sure about the helpful warning message though, do you mean this one

iframeConsoleRunner-6bce046e7128ddf9391ccf7acbecbf7ce0cbd7b6defbeb2e217a867f51485d25.js:1 Data Distribution flag (BaseDataSeries.containsNaN = false) can be applied to improve performance. Read this website article https://www.scichart.com/documentation/js/current/DataResampling.html for more info. To disable this warning set SciChartDefaults.performanceWarnings = false

That’s the only one I see.

Anyway, really happy that it doesn’t break anymore, thanks!

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.