How to stop an eventlistener

Share RGraph:   Share or Like RGraph on Facebook!

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Preben on 7th October 2012
In a gantt-chart I have made the bar adjustable by the user and added an eventlistener like

RGraph.AddCustomEventListener(gantt, 'onadjust',myFuncAdjust);


But for some of the bars I don't want the user to adjust/move the bar - can I cancel the event ?
Posted by RGraph Support on 8th October 2012
Hi,

Yes - you can set the adjusting information which is kept in the Registry to null.

The alert is optional BTW - you can take it out if you prefer. Another way to do it is the second example, which involves placing a DIV over the top of the canvas at just the right place (using the coordinates found in obj.coords) - this is shown in the second chart. This method will need adjusting if you use resizing and wouldn't work if you use annotating.

Add a reply




« Back to message list