Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MS-CHART: How to change labels
Message
De
13/05/2003 07:55:52
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00787404
Message ID:
00787647
Vues:
14
Hi Eric.

I am using the chart.vcx from the download section. Everything works fine but if I change thisform.mychart.cLabels = "TEST1,TEST2,TEST3", it is a nogo! It stays as R1, R2, R3

I have no idea how this class works, but I do have some knowledge about using MS-CHART < s >. I generally populate the control's datagrid from a cursor that has the Row Labels in the first column of the data and the values to plot in the rest of the columns. In the following code, the data being used to create the chart is in a cursor called csrResults:
LOCAL lnCol, lnRow
WITH THISFORM.oChart
  *** Set the number of fields in the cursor
  .ColumnCount = FCOUNT( 'csrResults' ) - 1

  *** Set the number of rows to the number of records in the cursor
  .RowCount = RECCOUNT( 'csrResults' )

  *** Populate the DataGrid Object.
  SELECT csrResults
  SCAN
    .Row = RECNO( 'csrResults' )

    *** Set up the row labels
    .RowLabel = EVALUATE( FIELD[ 1 ] )

    *** Populate the data grid with the numeric data
    FOR lnCol = 1 TO .ColumnCount
      .Column = lnCol
      .Data = EVALUATE( FIELD( lnCol + 1 ) )
    ENDFOR
  ENDSCAN

  *** Set up the column labels
  FOR lnCol = 1 TO .ColumnCount
    .Row = 1
    .Column = lnCol
    .ColumnLabel = ALLTRIM( FIELD( lnCol + 1 ) )
  ENDFOR
ENDWITH
HTH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform