Version

Client-Side Events

WebChart™ exposes a robust object model within the client-side JavaScript programming environment. The client-side object model contains many events that allow you to program vast amounts of functionality pertaining to the WebChart control without the need for server-side postbacks.

At design time, you can find client-side events in the ClientEvents section of the property window.

The following code demonstrates how to add event handlers at runtime for the ClientOnMouseClick client-side event.

Note
Note

Note : The parameters passed to the WebChart’s client-side events are the object that caused the event and the event arguments, in that order.

In Visual Basic:

 ' Assign the name of your client-side function to the property
  Me.UltraChart1.ClientSideEvents.ClientOnCrosshairMove = "UltraChart1_ClientOnCrosshairMove"

In C#:

 // Assign the name of your client-side function to the property
 this.UltraChart1.ClientSideEvents.ClientOnCrosshairMove = "UltraChart1_ClientOnCrosshairMove";

In JavaScript:

function UltraChart1_ClientOnCrosshairMove(x, y)
{
   window.status = "Crosshair at ("+x+","+y+")";
}