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 -;
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

  • You must to post comments

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:

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.