Home Forums Chart Support Manipulating axis cross hair from JS Reply To: Manipulating axis cross hair from JS

#25072

Manoj,

Thanks for the reply. I was able to get everything working the way I hoped.

I was really stumped on the synchronize sample for the MouseEvent. I was finally able to figure it out and suggest you change the sample code for the createEvent method. You can change it to this:

function createEvent(type, clientX, clientY)
{
var event = new MouseEvent(type, {
bubbles: false,
cancelable: true,
clientX: clientX,
clientY: clientY
});
return event;
}

The extra properties you have in the options aren’t needed. In fact, there is no way to be able to translate the client x or y to a screen x or y. That was the area that had me stumped for a couple of hours yesterday. It wasn’t until I decided to try removing the screenX and screenY parameters that I was able to get around the issue.