CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: MSChart

  1. #1
    Join Date
    Aug 2001
    Posts
    1

    MSChart

    hello,

    Can anyone direct me to a good guide on the mschart control? I'm doing ok with the basics of using it, but I need some more advanced features (I suspect they *are* there...).

    And two specific questions:

    1) How do I capture a double-click event on a line of data (in a line chart), so I can use the data of the line clicked?

    2) How do I display labels near every data-point, containing the values of the points?

    I would be gratefull if anyone could answer.

    Yael



  2. #2
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: MSChart

    'I found this in msdn (did not follow it all, so do not know if this may really help) searching for "mschart" - there were a lot of other info - :

    SAMPLE: CHRTSAMP.EXE Visual Basic MSChart Sample


    SUMMARY
    The MSChart control sample project demonstrates how you can use the MSChart control to graphically display numeric information. This control allows you to display several different 2D and 3D charts in a variety of ways by controlling the appropriate properties. This sample also includes a supplemental Help file that contains additional information about the MSChart control.

    The sample is available for download from the Visual Basic Owner's site at:

    http://premium.microsoft.com/downloa...c/ChrtSamp.exe (181Kb).
    Note that you have to register to enter this site.

    When you run the self-extracting executable, the following files are expanded into the VBWebSamples directory of your Visual Basic installation:
    ChrtSamp.vbp 2Kb


    frmchart.frm 13Kb


    frmchart.frx 11Kb


    gas.xls 17Kb


    modchart.bas 8Kb


    mschart.cnt 1Kb


    mschart.hlp 296Kb


    Readme.txt 2Kb


    © Microsoft Corporation 1999, All Rights Reserved.
    Contributions by Arsenio Locsin, Microsoft Corporation


    Additional query words: ms chart charting example graph

    Keywords : kbfile kbsample kbchart kbVBp500 kbGrpVB
    Version : WINDOWS:5.0
    Platform : WINDOWS
    Issue type : kbhowto
    Technology : kbvcSearch


    Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris
    and all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

    The Rater
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  3. #3
    Join Date
    Dec 2001
    Location
    India(Delhi)
    Posts
    5

    Re: MSChart

    Using the PointActivated Event to Change a Data Point
    If you've started to explore the MSChart control, you will notice that it has a large number of events. These events allow you to program the chart to respond to practically any action of the user. As an example of this programmability, the PointActivated event is used in the following example to show how a data point can be changed using the Series and DataPoint parameters. (The PointActivated event occurs whenever a data point is double-clicked.) The Series and DataPoint parameters correspond to the Column and Row properties, and can thus be used to set the Data property:

    Private Sub MSChart1_PointActivated(Series As _
    Integer, DataPoint As Integer, MouseFlags As _
    Integer, Cancel As Integer)
    With MSChart1
    .Column = Series
    .Row = DataPoint
    .Data = InputBox _
    ("Change the data point:", , .Data)
    End With
    End Sub



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured