Pre loader

A lot of rows in 1 second on DateTimeNumericAxis

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

Tell me, please, how best to organize the graph in the case when on the time axis we can have more than 100-1000 records within 1 second. The problem seems to be that the X value must be accurate to at least 1 second? How to make records with even greater accuracy. and at the same time the time on the axis was shown correctly for this kind of data?

Version
3.1.346
  • You must to post comments
Best Answer
0
0

Hi Yevhenni,

Have you seen our documentation page on the DateTimeNumericAxis? this shows you how you can load unix date stamps into SciChart.js. These can be later converted to/from JavaScript Date type, theoretically allowing you any resolution

There’s a code example there of how to setup a DateTimeNumericAxis, and a codepen. You shouldn’t have a problem loading in 1,000 records with 1-second interval.

I’ve created you a custom codepen to demonstrate this. This includes functionality from the DateTimeNumericAxis documentation page and the LabelProvider page, which shows how to create a dynamic label provider with label formatting changing depending on zoom depth. This has 1,000 records with 1-second interval.

Please find the codepen here.

Try it out? If you find a specific bug or problem, please report it here on the forums. Sharing a codepen is the most helpful way for our engineers to understand the issue & fix problems.

Thank you!

-Andrew

  • You must to post comments
0
0

Update: we just noticed a bug(?) / issue where by the DateTimeNumericAxis won’t calculate deltas lower than 1 second.

This means that for resolutions below a second in SciChart.js you don’t get axis labels.

To fix this, in our Codepen we previously provided, we added a hint to suggest meaningful deltas that the axis can calculate. This is done as follows using the possibleDeltas property of an axis.

  const xAxis = new DateTimeNumericAxis(wasmContext, {
    axisTitle: "X Axis / DateTime",
    // Need to pass in smaller possible Deltas to allow for millisecond ticks
    possibleDeltas: [
        0.001,
        0.002,
        0.005,
        0.01,
        0.02,
        0.05,
        0.1,
        0.2,
        0.5,
        1,
        2,
        5,
        10,
        15,
        30,
        60,],
    labelProvider: new DynamicDateLabelProvider(),
  });

With that you can now zoom into milliseconds using SciChart.js and unix time stamps. Here’s a quick gif showing the zoom resolution down to milliseconds.

enter image description here

We’re going to address this in future releases, but for now, use possibleDeltas to extend precision of the date axis.

Best regards,
Andrew

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.