Pre loader

2d X/Y plot: Auto scaling and tooltip not working (JS + Blazor)

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

Hi
I am trying out JS SciChart based on the Blazor example you have posted more than a year ago.
I cannot get the auto scaling to work by code (the default behavior does auto scale once right after adding the data). Calling sciChartSurface.zoomExtents(); (or zoomExtentsX() and zoomExtentsY() after one another) does zoom into a very details portion of the graph.

Also (maybe related) the tooltip does not update when moving the cursor around, it always keeps the same data. I tried using CursorModifier as well as RolloverModifier, both having the same problem.

Attached the JS code and the c# files and a picture how this looks like after calling the autoScale() method.

Thanks for any help
Regards
Reto

Version
2.0.2115
Attachments
Images
  • You must to post comments
0
0

Hi Ivan
Thanks a lot for the quick answer. Indeed updating to v2.1.2301 fixed the tooltip issue, but the auto scaling (calling sciChartSurface.zoomExtents()) still requires the dataIsSortedInX:false. After adding that it worked perfectly!

Thanks again
Kind regards
Reto

  • Ricardo Diz
    Thank’s Reto! Our fault that this library was not updated to the latest version in the blazor sample. Hope you’re all set now! Best regards, Andrew
  • Reto Stahel
    Hi Andrew I understand. Do you know if you will have an updated blazor sample with a fully implemented wrapper? E.g. what I am looking for is how to be able to handle a hit or select event in my c# code behind, so having some feedback from the SciChart back into my c# code behind. Thanks Reto
  • You must to post comments
1
1

Hello,

In this case, to make it work properly with v2.0.2115 of the lib, you need to specify if the data is sorted with the “dataIsSortedInX” option in the Data Series definition:

const xyDataSeries = new XyDataSeries(wasmContext, {dataIsSortedInX: false});

FYI, this is handled automatically in the newer versions of the library (2.1.x).
So alternatively you can simply update the version of SciChart used in your project.

Best Regards,
Ivan

  • You must to post comments
Showing 2 results
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