Wanna create some cool charts in VFP ?
With no ActiveX controls, dlls, or 3rd party products ?
What do you think of these ?




Recently, I’ve seen many discussions about people asking for charts components.
Since GdiPlusX brings us all these possibilities, I thought it would be worth to start a project regarding this.
FoxCharts is a subclass of the ImageCanvas class from GdiPlusX, that allows us to direct draw in an image object, among many other cool and useful features, that are not in the scope of this post.
Goals of FoxCharts:
- Create good looking and modern charts in pure VFP
- NO ActiveX components
- Easy to setup
- Easy to customize.
- Easy to save to disk or print
- Open Source
- Benefit from all the GdiPlusX drawing capabilities, allowing users to modify the charts the way they like.
- Save as EMF, resulting in perfect charts when printed in VFP reports
Prerequisites:
Visual FoxPro 9 and the GdiPlusX library from VFPX
In the source code you'll find a sample form, “NewChart.Scx” that allows to create different kinds of charts using this class.
Please note that as it is still in Alpha version, the codes that create the charts are still in the sample form. GpCharts.vcx is (at this moment) just a holder that contains the PEMs needed to draw. In development mode, double click the ImageCanvas object to see the source code that generates these charts.
The codes that will instantiate GpCharts reside in the INIT() event of the sample form, only there.
Currently available:
Bars, Lines, Area, Pie and Donut charts, in various color variations, using gradients, custom colors, basic and random colors.
Titles, subtitles and legends
To do:
Enhance the data filling, create a builder, allow different kinds of charts to appear together (eg. Lines and bars). Legends in the Y and X axys.
And obviously:
Fix some bugs !
If you are interested in developing and enhancing FoxCharts, feel free to post a comment here.
Your suggestions, tips, critics, testing and bugs hunting will be most appreciated !
Download directly from the FoxCharts page in VFPX
http://www.codeplex.com/VFPX/Wiki/View.aspx?title=FoxCharts&referringTitle=Home