Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Yun-Shan Yeh
  Where is Yun-Shan Yeh?
 Huntington Station
 New York - United States
 Yun-Shan Yeh
 To: Bill von Valtier
  
 Rochester
 
 Bill von Valtier
 Tags
Subject: RE: graph(chart)
Thread ID: 32412 Message ID: 58343 # Views: 2 # Ratings: 0
Version: Visual FoxPro 7 Category: General VFP Topics
Date: Wednesday, December 22, 2004 9:13:23 PM         
   


Dear BillvV,

I read this and your other thread (#21087). I also want to make graphs without msGraph or other ActiveX controls.
I had experience using C and assembly to place dots on graphic mode (and hence, lines, curves, etc.) 15 years ago.

In VFP, how do you Draw Graph outline box, set colors; Draw Ordinate steps and labels; Draw graph variables (lines, bars) using data from a table; and Draw labels and captions as you described in this thread?

I am trying to develop an stock analysis program for my own use. Your input to my question will be no doubt a shortcut to my goal.

Thanks in advance.

Regards,
Vincent Yeh
ysyeh@acedsl.com


> > I need to make graphs without msGraph or other activeX control. do someone have good code for this, or i should write it all.
> >
> > Zlatko
>
> Hello Zlatko,
>
> I have been coding my own graphs since the late 1980's, with FXP2.6 for DOS, when there was only a very primitive graphing utility. Since then, as FoxPro has advanced, I have re-tried the resident FoxPro graphing modules, and each time I have found there something it will not do for me that my own stuff will do. So I have continued to use my own code
>
> I don't have any ready made library to send because I just code each graph on the fly when I need it. If you want me to send you a sample I could do so by email, if that would help.
>
> Although coding your own graphs is more work time that using MSGraph or other ready-mades, I find it much more flexible, and I enjoy doing it. BUT... and this is a big "but"... I'm not a professional, I'm a hobbyist, and I don't have to make time efficiency a priority.
>
> That said, here are the steps I take to set up a two dimensional graph:
>
> 1. Establish constants for: LeftMargin, RightMargin, TopMargin, BottomMargin
> 2. Draw Graph outline box, set colors
> 3. Set constants (could also be variables): HiOrdinateValue, LowOrdinateValue, OrdinateStep
> 4. Calculate YAxisMultiplier
> 5. Draw Ordinate steps and labels
> 6. Set constants (could also be variables): HiAbscissaValue, LoAbscissaValue
> 7. Calculate XAxisMultiplier
> 8. Draw graph variables (lines, bars) using data from a table. (X and Y positions of each point are calculated during looping by using the above X- and YAxisMultipliers
> 9. Draw labels and captions.
>
> As for some of the details, see Thread 21087, in which I showed the math for calculating an x-axis.
>
> Good Luck
>
> BillvV


ENTIRE THREAD

graph(chart) Posted by ( Zlatomir ) Zlatev @ 11/8/2003 10:09:49 AM
RE: graph(chart) Posted by Eric den Doop @ 11/8/2003 11:35:42 AM
RE: graph(chart) Posted by Bill von Valtier @ 11/9/2003 4:25:22 PM
RE: graph(chart) Posted by ( Zlatomir ) Zlatev @ 11/12/2003 11:44:01 AM
RE: graph(chart) Posted by Yun-Shan Yeh @ 12/22/2004 9:13:23 PM