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
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.
bars, lines, area, pie and donut charts, in various color variations, using gradients, custom colors, basic and random colors.
titles, subtitles and legends
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.
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