Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Plotting graph in Visual FoxPro v5.0
Message
From
11/12/1998 11:07:52
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
11/12/1998 05:36:51
Aaron K. Y. Chu
Health & Care Co. Ltd.
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00165955
Message ID:
00166598
Views:
13
>The code is very nice and easy to understand.
>
>Thank you very much!
>But I want to ask you 2 question about these codes :
>
>1.ox.charts(1).chartwizard(.range(.cells(1,1),.cells(4,3)),xl3DColumn,4,1,0,1,1,"","","","")
>
>a. what is the number after xl3DColumn represented for ?
>b. what is the "" stand for?
>
>2. ox.charts(1).plotby = 2
>
>what is the meaning? and what is the other value?
>
>
>P.S. where can you find the code?
>
>Thank you a lot!
Hi Aaron,
Today tried a lot to reply before but couldn't. I apologize being late.

4 stands for built-in autoformat number and "" stands for empty string for titles.
ox.charts(1).chartwizard(.range(.cells(1,1),.cells(4,3)),xl3DColumn,4,1,0,1,1,"","","","")

Codes reside as tested samples on my disk and while doing some addition-subtraction I don't care really for those not needed anymore.
Now this one really need not those parameters, they're optional. Only first one (range) is required. It could just be :
ox.charts(1).chartwizard(.range(.cells(1,1),.cells(4,3)))

since we later play charttype. Really later we play many things so in fact we don't need chartwizard there. "SetSourceData" for chart instead :
with ox.charts(1)
* SetSourceData(Range[, PlotBy]) && Plotby - xlRows, xlColumns
#define xlRows 1
#define xlColumns 2
.SetSourceData(ox.ActiveWorkBook.Sheets(1).Range("A1:C3"))
* Notice you can use "A1:C3" too for range if you prefer
* instead of lengthy cells()..
endwith
This code part also removes the need for :
ox.charts(1).plotby = 2

Now it's included. Plotby = 2 (xlColumns) is best suited to us Foxers because we really keep data in column format. Default chart format is by rows (PlotBy = 1).

I don't use any other doc other than default hlp files in ..\Microsoft Office\Office (vba*.hlp). Just from time to time I record a macro in Excel or Word and copy, paste the macro code to VFP, do some retouching to fit VFP syntax and "done" :)
Maybe the best learning is while I answer on UT :)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform