Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MSChart ActiveX control
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00377638
Message ID:
00381423
Vues:
25
>>Has anyone had any success using the MSChart control in a VFP form???
>
>What's the problem?

Hey Erik, I have the code from Knowledgebase and its working for me. I want to add a Label to the graph.

This code is how I am updating the data:
scan
*for i = 1 to 2
*.column = i
.column = 1
.row = recno()
* .data = iif(i=1,grouptmp.groupcd,grouptmp.sales)
.data = grouptmp.sales
*endfor
endscan

You can see the commented lines on for / endfor. The VB code says the the control will accept a character code initially as the lable. But the .data won't accept character data.

I am trying to not do the append general line because I have that working already and I want to make the control take it.

Here is the VB help file:
Adding Labels to the Chart

When you create a multi-dimensioned array, the first series can be assigned a string; when the array is assigned to the ChartData property, the strings become the labels for the rows. The following code shows this feature.

Dim arrValues(1 to 5, 1 to 3)
Dim i as Integer
For i = 1 to 5
arrValues(i, 1) = "Label " & i ' Labels
arrValues(i, 2) = 0 + i ' Series 1 values.
arrValues(i, 3) = 2 * i ' Series 2 values.
Next i
MsChart1.ChartData = arrValues


Any ideas on this?

__Stephen
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform