The following properties of the NChartControl object were removed:
NChartControl.AsyncClickEventEnabled
NChartControl.AsyncDoubleClickEventEnabled
NChartControl.AsyncMouseMoveEventEnabled
NChartControl.AsyncMouseUpEventEnabled
NChartControl.AsyncMouseDownEventEnabled
The following properties and events of the NChartControl object were added instead:
NChartControl.AjaxTools
NChartControl.QueryAjaxTools
The former mouse event handling and routing mechanism was replaced by a client side controller architecture. Pairs of client side tool class and server side tool definition class were added for all types of mouse events. To enable a callback mouse event, the corresponding tool definition must be added to the chart control’s AjaxToolscollection property. Tools must be added to the AjaxToolscollection from a handler of the new QueryAjaxTools event. Adding tools from another code point will produce unpredictable results. Here is an example on how to enable the mouse click callback event:
C# |
Copy Code
|
---|---|
protected void nChartControl1_QueryAjaxTools(object sender, EventArgs e) { nChartControl1.AjaxTools.Add(new NAjaxMouseClickCallbackTool(true)); } |
Visual Basic |
Copy Code
|
---|---|
Type your example code here. It will be automatically colorized when you switch to Preview or build the help system. |
If no interactive areas are defined, the click callback tool, as initialized above, will cause mouse clicks to be processed for the whole chart image. To define interactive areas of the control, add interactivity styles to the chart elements in your Form_Load page method, like this:
C# |
Copy Code
|
---|---|
mySeries.InteractivityStyles.Add(i, new NInteractivityStyle(true)); |
Visual Basic |
Copy Code
|
---|---|
mySeries.InteractivityStyles.Add(i, New NInteractivityStyle(True)) |
To optimize the mouse move event handling the new AsyncMouseOverand AsyncMouseOut events can be used instead of the AsyncMouseMove event. For more details, see the documentation on NInteractivityStyle and the web examples that are installed on your machine.