From: Yun-Shan Yeh
New York - United States
To: Bill von Valtier
Bill von Valtier
Visual FoxPro 7
General VFP Topics
Wednesday, December 22, 2004 9:13:23 PM
This message was rated by:
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.
> > 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
Posted by ( Zlatomir ) Zlatev @ 11/8/2003 10:09:49 AM
Posted by Eric den Doop @ 11/8/2003 11:35:42 AM
Posted by Bill von Valtier @ 11/9/2003 4:25:22 PM
Posted by ( Zlatomir ) Zlatev @ 11/12/2003 11:44:01 AM
Posted by Yun-Shan Yeh @ 12/22/2004 9:13:23 PM