Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1810
Using Methods like getItem and getItemIndex
posted

Is there any example showing how to use methods like 'getItem' and 'getItemIndex' in igDataChart. On this page http://help.infragistics.com/jQuery/2013.1/ui.igDataChart only method signature is shown.

ACTUALLY, I'M TRYING TO FIND WHICH DATA-POINT IS CLICKED, SINCE THERE IS NO EVENT OR METHOD AVAILABLE FOR DATA-POINT CLICK, I TRIED USING SERIES EVENTS.

I tried using the method getItemIndexFromSeriesPixel as below,

//On Series Mouse left Button Up, call logSeriesClick

seriesMouseLeftButtonUp: function (event, args) { logSeriesClick(event, args); },

//Using the mouse position, get the item beneath it.

function logSeriesClick(event, args) { 

var xPos = Math.round(args.positionX * 10) / 10;
var yPos = Math.round(args.positionY * 10) / 10
logEvent('Series MouseUp (x, y): ' + xPos + ", " + yPos);
var item = chart.igDataChart("getItemIndexFromSeriesPixel", "series1", { x: xPos, y: yPos });
logEvent(item);

}

But I'm unable to get any index, the 'item' variable is always having the chart object.