I’m trying to add rollover / tooltip to a chart, which uses sweeping. First, everything is working fine, but after updating the data over more then one page, the rollover is messing around with the data.
I created a codesandbox with the vitalsign demo: https://codesandbox.io/p/sandbox/javascript-vital-signs-ecg-medical-chart-example-forked-2zqcs3
First the rollover works great. Wait until the data is updated to the left side. Then you’ll see the messed up values and rollover points.
- J Quader asked 9 months ago
- last edited 9 months ago
- You must login to post comments
Hi there
I’m running your codesandbox now. I can see the rollover numbers are out of sync with the data once sweeping mode has wrapped around.
Let me report a bug to the scichart.js team, we will get back to you once we have an update.
Best regards
Andrew
- Andrew Burnett-Thompson answered 9 months ago
- You must login to post comments
Hi
This is now fixed in dev. Fifo sweeping mode is a weird case where we append data using a circular buffer, but then read it back in raw form. The hitTest methods did not quite handle this correctly.
To fix this I have added a getNativeValue method to dataSeries. This allows you to read the correct value when dealing with fifo sweeping series and is especially useful if you are swapping between sweeping/normal. It is used like this:
// dataSeries.getNativeXValues().get(index) is wrong for fifo sweeping
const xValue = dataSeries.getNativeValue(dataSeries.getNativeXValues(), index);
I will update you when this is released, which should be early next week.
Regards
David
- David Burleigh answered 9 months ago
-
This fix is now released in version 3.2.555.
- You must login to post comments
@David Burleigh Thank you for the reply. Honestly I do not understand which part in the demo needs to be changed. There is no getNativeXValues
, which I would replace in the new version.
- J Quader answered 9 months ago
- last edited 9 months ago
-
Hi J, it’s not been released yet, but will be shortly
-
You don’t need to change anything. I just mentioned that new api in case you had any custom code that was reading back from the dataSeries.
- You must login to post comments
Please login first to submit.