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
- Reto Stahel asked 1 year ago
- You must login to post comments
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
- Ivan Gasyuk answered 1 year ago
- You must login to post comments
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
- Reto Stahel answered 1 year ago
- last edited 1 year ago
- 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
- 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 login to post comments
Please login first to submit.