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

Threaded View

  1. #1
    Join Date
    Aug 2005
    Posts
    38

    column of data from a flexgrid to MSChart

    Hello
    I'm trying to send a column of data from a flexgrid to MSChart to plot. But, with this code all I get is the last entry of the first column. This number is the same across the chart x-axis. So the chart has a straight line left to right.

    I wanted all the values of the single column plotted. My chart has years as the x-axis and amount as the y-axis.
    Code:
    For iRowCount = 1 To tempview1.MSFlexGrid1.Rows - 2
         For iColumnCount = 1 To 12               
                ' assign a FlexGrid cell's data to dCurrData 
                dCurrData = tempview1.MSFlexGrid1.TextMatrix(iRowCount, iColumnCount) 
                With MSChart1
                     .ColumnCount = 1
                     .Column = iColumnCount
                     .Row = iRowCount
                     .RowCount =  tempview1.MSFlexGrid1.Rows -2 
                     .Column = iColumnCount 
                     .Data = dCurrData 
                     .enabled = True 
                End With
           Next iColumnCount
    Next iRowCount
    any help is much appreciated
    Steve
    Last edited by codeUp; September 18th, 2005 at 02:41 PM.

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