SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components
I encountered an exception inside scichart2d.js when I used hitTestProvider.hitTest.
getHitTestInfo(idx, e) {
let touch0 = e.targetTouches[0];
let rect = e.currentTarget.getBoundingClientRect();
let x = parseInt(touch0.pageX - rect.left);
let y = parseInt(touch0.pageY - rect.top);
const premultipliedX = x * DpiHelper.PIXEL_RATIO;
const premultipliedY = y * DpiHelper.PIXEL_RATIO;
let lineSeries = this.$store.state.components.scitchart.sciObj[idx].sciChartSurface.renderableSeries.items[0];
console.log(`lineSeries.hitTestProvider.hitTest(${premultipliedX}, ${premultipliedY}, ${DpiHelper.PIXEL_RATIO})`);
let result = lineSeries.hitTestProvider.hitTest(premultipliedX, premultipliedY, DpiHelper.PIXEL_RATIO);
return result;
}
The video URL is as follows
https://youtu.be/3GIlv_ldorY
Hi Chinghung. Thank you for sharing this example. We’ve investigated the issue and found the cause of the problem.
The xValues and yValues must be (number[] or Float64Array)
You need to replace xValues, yValues with the correct type:
const xValues = Array.from({length: 100}, (x,i) => i); (for your case, from provided example)
If you want to custom axis labels, please, use the LabelProvider:
Please login first to submit.