Code Examples
  Home arrow Code Examples arrow The Basics of Charting with the MS Chart C...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
CODE EXAMPLES

The Basics of Charting with the MS Chart Control
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 25
    2006-08-28

    Table of Contents:
  • The Basics of Charting with the MS Chart Control
  • What if the Chart Control is not installed?
  • Organization of the chart
  • Getting into the plot area

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    The Basics of Charting with the MS Chart Control


    (Page 1 of 4 )

    MS Chart Control 6.0 (OLEDB) is the MSChart20.ocx ActiveX control that you can use in VB 6.0 for creating charts. It can graphically display data and format the various regions of the chart. Since it is not a standard control it must be added from the components collection. It is by no means an easy to use interface. This tutorial looks at some of the basic manipulations that you can do with this control. This control appears in FAQ (frequently asked questions) on many forums.

    Adding the Chart Control

    Start a standard Visual Basic EXE project which comes with a form. Click on the menu item Project and then click on the drop-down menu item Components and wait a few seconds. You will see the following window. Scroll down and place a check mark against this component as shown. If you also place a check mark for Selected Items Only, only this item will be shown. Click Apply and this adds an icon for this control to your tool box, which you may see in the picture that follows.

    Now click on the icon (bottom right) and draw it on the form as shown. This is the default view of this control on the form. It shows five rows and each of these rows has 4 columns differentiated by their color.

    All ActiveX controls have Property Pages (a collection of tabbed pages) and also a Properties Window, listing properties that can be set at design time. This control has some 50 classes, each with many methods and properties. 

    The next picture shows the Property Pages for this control. With this a number of properties can be set for this control by tabbing to the right page. Here you can choose the type of graph (chart), the Axes (x, y1, y2), the Series (the number of columns that you may have in your data), and so forth.

    The Properties window shows the default values for the chart, displayed here. We will only examine a couple of properties and methods to get some basic understanding of how this control works.

    More Code Examples Articles
    More By Jayaram Krishnaswamy


       · There is always someone asking about this control and I am not sure whether...
       · check out chart controls from visifire. it is a great way of creating cool...
       · Have you written that article yet (fetching data to MSChart through recordsets)?...
     

    CODE EXAMPLES ARTICLES

    - Bipartite Graphs
    - Connectivity in Graphs
    - The Ford-Fulkerson Algorithm
    - Critical Paths
    - The Bellman-Ford and Roy-Floyd Algorithms
    - Shortest Path Algorithms in Graphs
    - Minimum Spanning Tree
    - Articulation Edges and Vertexes
    - Circles and Connectivity in Graphs
    - Depth-First Search in Graphs
    - Breadth-First Search in Graphs
    - The Prufer Code and the Floyd-Warshall Algor...
    - An Insight into Graphs
    - Coding a Custom Object with WSC
    - Creating a Custom Object with WSC





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek