Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Graph / msgraph.chart Question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00391259
Message ID:
00391404
Vues:
10
Question

The following code isn't is straight foxpro? or does the class parameter refrence a office thing? Class "MSGraph.Chart"

lcGeneralString = "" + Chr(9) + "18 to 24" + Chr(9) + "25 to 34" + Chr(9) + "35 to 44" + Chr(9) + "45 to 54" + Chr(9) + "55 to 64" + Chr(9) + "65 and over" + Chr(9) + "Unknown" + Chr(13) + Chr(10) + ;
"Age Range" + Chr(9) + AllTrim(Str(iAgeRange1)) + Chr(9) + AllTrim(Str(iAgeRange2)) + Chr(9) + AllTrim(Str(iAgeRange3)) + Chr(9) + AllTrim(Str(iAgeRange4)) + Chr(9) + AllTrim(Str(iAgeRange5)) + Chr(9) + AllTrim(Str(iAgeRange6)) + Chr(9) + AllTrim(Str(iTotal - iAgeRange1 - iAgeRange2 - iAgeRange3 - iAgeRange4 - iAgeRange5 - iAgeRange6)) + Chr(13) + Chr(10)

>>Append General curGraphs.Age Class "MSGraph.Chart" Data lcGeneralString

>>Once you have this you can either double-click on the field and edit it to what you want or you can programatically format it as an olebound object on a form (hidden).

Setting the look you want is not difficult, but finding the values is. Here is a piece of the code I used to do a age pie chart.

>>With ThisForm.oleAgeGraph
.ControlSource = "curGraphs.Age"
.Type = 5
.ChartArea.Font.Name = "Arial"
.ChartArea.Font.Size = 8
.ChartArea.Font.Bold = .F.
.HasLegend = .T.
.Legend.Position = -4107
.Legend.Interior.ColorIndex = -4142
.Legend.Border.LineStyle = -4142
.SeriesCollection(1).Points(1).HasDataLabel = .T.
.SeriesCollection(1).Points(1).DataLabel.Type = 4
.SeriesCollection(1).Points(2).HasDataLabel = .T.
.SeriesCollection(1).Points(2).DataLabel.Type = 4
.SeriesCollection(1).Points(3).HasDataLabel = .T.
.SeriesCollection(1).Points(3).DataLabel.Type = 4
.SeriesCollection(1).Points(4).HasDataLabel = .T.
.SeriesCollection(1).Points(4).DataLabel.Type = 4
.SeriesCollection(1).Points(5).HasDataLabel = .T.
.SeriesCollection(1).Points(5).DataLabel.Type = 4
.SeriesCollection(1).Points(6).HasDataLabel = .T.
.SeriesCollection(1).Points(6).DataLabel.Type = 4
.SeriesCollection(1).Points(7).HasDataLabel = .T.
.SeriesCollection(1).Points(7).DataLabel.Type = 4
EndWith
Stephen McLaughlin
"Sexy Steve Valenteno", "Blastmaster"
stephenmclaughlin@gmail.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform