.netCHARTING v5.1 Documentation Send comments on this topic.
Using with WinForms
Getting Started > Installation & Usage > Using with WinForms

Glossary Item Box

.netCHARTING Winforms Support

A winforms version has been released in conjunction with .netCHARTING 3.0.  This enables usage outside of a web environment and in desktop applications.  The winforms bundle (dotnetchartingwinforms.zip) contains a separate assembly dotnetcharting.winforms.dll.

The winforms control will not function in a web environment.  In addition, the web version (dotnetcharting.dll) will not function outside of a web environment.

If you are already familiar with .netCHARTING the winforms version will also be familiar.  When you run the provided sample application (dotnetchartingsamples.exe) you will discover the code for various charts is identical.  This application provides an interface for viewing different charts along with the source for each in C# and VB.NET.  You can also print the source listing or copy it to the clipboard for subsequent use.

Differences from the WebForms version:

  1. The winforms Chart control is inherited from System.Windows.Forms.userControl and you have access to all events,properties and methods of UserControl in addition to the full .netCHARTING object model.
  2. Width and Height  properties are "int" type versus WebControl which are Unit type.
  3. HitTest method.  This method accepts the X,Y position on the chart image and returns the corresponding object for that point of the Image. These are 3  overloaded methods for HitTest method: 
        
    [C#]
    
    HitTestInfo  myObj =  HitTest(x,y);
    [Visual Basic]
    HitTestInfo  myObj =  HitTest(x,y)
    x,y are int and represent the point you want to get the related object from.
                 
    [C#]
    HitTestInfo  myObj =  HitTest(myPoint);
    [Visual Basic]
    HitTestInfo  myObj =  HitTest(myPoint)
    myPoint is "Point" type and represents the point you want to get the related object from.

    [C#]
    HitTestInfo  myObj =  HitTest();
    [Visual Basic]
    HitTestInfo  myObj =  HitTest()
    If you do not pass the cursor position, internally this method uses the position from the Chart control.  This usage would be applicable when using the winforms control in a winforms project.

    Currently, the HitTestInfo Class has one property called "Object". It will hold the object clicked and can be used for drilldown or other advanced integration with the chart in a winforms environment.
  4. When you use Object.URL properties, such as Element.URL when you click on the Element, a new browser window will be launched with the URL value specified.  URL target has no effect in a winforms environment.

©2002 - 2008 Webavail Productions Inc. & Corporate Web Solutions Ltd. All Rights Reserved.