Pre loader

Unsorted data in the x-direction

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

1
0

Some of our charts plot data consisting of descending X values (e.g. a voltage range from 0 to -1000). These charts worked fine in v3.1, but having migrated to 6.5 they now throw the “unsorted” exception as per your performance tips & tricks page. Am I okay in this scenario to enable unsorted data (AcceptsUnsortedData = true), or will the descending X values still cause issues for SciChart?

I guess the proper solution would be to reverse the start & end values, so X is always ascending (-1000 to 0), but this would be a decision for our stakeholders as to whether they want to see the charts like this.

On a vaguely related note, your performance tips & tricks page mentions the “visual xccelerator engine”. Is there any reason why I can’t enable this application-wide, for every chart? Are there any risks or downsides to using this feature? Just wondering why it’s not enabled by default if it’s so beneficial.

Version
6.5
  • You must to post comments
1
0

Hi Andrew,

Some answers below

throw the “unsorted” exception as per your performance tips & tricks page

Yes, reason is that sorted data in X confers large performance benefits for things like hit-test (tooltips) and rendering. The exception si a warning as we found too many people were simply unaware they were losing performance. You can stop the warning by setting DataSeries.AcceptsUnsortedData = true. However this will then incur the performance dropdown.

Alternatively, you can append data sorted in X and set Axis.FlipCoordinates = true. This will get the exact same visual effect but will get you all the performance benefits.

Finally potentially we could enable performance enhancements for X-values sorted descending however that would be a feature-request and we would have to prioritise it, or, build as custom work.

Is there any reason why I can’t enable the Visual Xccelerator engine application-wide, for every chart?

Yes you can do this. I would use an implicit style, like this. This will apply the DirectX hardware acceleration application wide

 <Style TargetType="s:SciChartSurface">
    <Setter Property="s:VisualXcceleratorEngine.IsEnabled" Value="True"/>
 </Style>

This will result in significant performance improvements, in some cases an order of magnitude or two over software rendering.

Why don’t we enable this by default? Simply our policy is to minimise breaking changes and maximise backward compatibility. You are working on v3 – v6 which is a huge jump (most of that jump occurred from v3 to v4, subsequent releases have had far fewer breaking changes). We like to ensure new features are well tested before rolling them out to the entire userbase.

That being said, Visual Xccelerator engine should work on a very wide range of hardware and will drop down to software rendering when DirectX is not available.

Let me know if that helps

Best regards,
Andrew

  • Andrew Stephens
    Many thanks. I’m still sorting out the last of many issues having migrated from 3.1, but look forward to trying it out on our bigger charts to see how the performance fares. After enabling the engine I can see that it writes quite a lot to the VS output window during startup. Is there any way to suppress this?
  • Andrew Stephens
    I do have one observation after enabling the engine. Whenever the application starts up, one or two charts initially render as a completely black rectangle, and only sort themselves out once I start appending data. It seems to be random too, with different charts exhibiting this behaviour each time the application starts up. Do you have any suggestions?
  • Andrew Burnett-Thompson
    Hi Andrew, I don’t believe there is a way to suppress debug output on startup, but this info is not written if your app is compiled in release mode or if Trace is disabled. Regarding the black square, I suggest opening a separate support ticket? Could be hardware dependent, could be big. I’d also recommend trying our examples app (Vx renderer enabled by default.) does the problem occur there? Send over your hardware profile, the debut output in vs console and try the examples app in a new ticket and we will see what we can do
  • 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