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
My God!
ReplyDeleteThank you!
Hi Cesar,
ReplyDeleteSimply congratulation !
I wait this tips for along time !
ps : do you know the way to use this class in Report Frx ?
Thank's for Foxpro and all Fox's developer
Olivier
Excelent work once again Cesar.
ReplyDeleteVFP and GDI+ Rock!
Dave Crozier
Terrific!
ReplyDeleteThis will be very useful to VFP Community.
I don't know why you wasn't named an MVP yet!
Holy Cowpie!
ReplyDeleteGreat work!!! You've done it again Cesar!
Although my wife doesn't know it yet, I know what I'll be doing this weekend ;-)
Absolutely stunning!!! Thank you!
ReplyDeleteMalcolm
Wow...great stuff!
ReplyDeleteWhat's in your future plans? You seem to make such great things for VFP with GDI that I'd be interested in hearing "what's coming" ...thanks!
awesome dude....keep up the good work.
ReplyDeleteCesar
ReplyDeleteAbsolutely Brilliant!!!
Need I say more?
Bom trabalho, César
ReplyDeleteO grafismo é Muito Bom. Tomara que eu seja capaz de fazer qualquer coisa com jeito. Vou tentar experimentar.
Um abraço.
Cesar
ReplyDeleteTerrific work ... again :)
In my book you already are an MVP
VFP + GdiPlusX rocks!
Obrigado !!!
Hello, César
ReplyDeleteQuando tento compilar o exemplo FoxChartsAlpha obtenho o seguinte erro.
Compiling f:\documentos\arui\visual foxpro projects\papacalorias\bibls\gdiplusx.vcx
Error in global include file: Include file 'f:\documentos\arui\visual foxpro projects\papacalorias\bibls\system.drawing.h' is not found.
É bug?
Atenciosamente
Olá Rui !
Obrigado por testar. Na verdade, eu incluí o arquivo "System.App" para facilitar os testes dos usuários. O ideal´seria baixar a GdiPlusX diretamente do site do CodePlex, assim vc estará seguro de estar usando a versão mais recente.
De toda forma, eu acabo de atualizar o arquivo, incluindo os arquivos de "Header" necessários. Por favor, baixe novamente !
Não se esqu~ça de que esta versão é ALPHA ainda, não é recomendada para uso em produção. :-)
Um abração
César
Impressive stuff. Will give it a shot
ReplyDeleteThanks very much for the kind words, positive feedback and comments! I hope to publish an updated version in the next week, with some few new features.
ReplyDeleteIMO, with the help comming from the community, FoxCharts can become a very useful and popular tool.
GdiPlusX Rocks !
Bravo Cesar!
ReplyDeleteSimply brilliant, man you are awesome!!!
ReplyDeleteThanks, thanks, thanks
Shine on you crazy diamond!!!
Uhhh, I don't know what to say.....
ReplyDeleteWell done Cesar
ReplyDeleteThank you! Cesar!
ReplyDeleteBut... there is so much new vfp-stuff going around these days...
I don't have enough time to learn and use all these nice new things... :-|
Wow - Awesome in so many ways!!!!!!!!!!
ReplyDelete
ReplyDeletethank you so much Cesar for this great tool!
Great work Cesar !! I'm loving Foxpro!
ReplyDeleteI too had the same thought like Emerson... why you wasn't named an MVP yet!
but no probs! you are MVP for all here..
No Words of expressing thanks, but simply thank you.
ReplyDeleteKindly explain how to print this??
Hi, thanks for the kind words.
About printing, right now the most simple way is to save the image in a temp file and use the report designer to print.
Another option is to send directly to the printer using Gdi+, just like this:
Thisform.GpCharts.oBmp.ToPrinter()
Obviously, I hope to show how to use the class directly in a form, but I'll leave this for the future.
PLEASE wait, don't put this in production yet. I need to apply some important modifications, and in the next few days I'll post a new and more confident version.
Regards
Cesar
Hola César, esto excelente, trabajo desde mucho tiempo en procesamiento de información con VFP y esto me va a servir para añadirle a mis programitas y tal vez mejorar y ayudar crear mejoras en el código para la salida gráfica.
ReplyDeleteMuchas gracias por tan excelente trabajo,
José
Parabens César!
ReplyDeleteExcellent work. Looking good indeed!
Parabéns Cesar! Excelente trabalho!
ReplyDeleteHow to set up targets?
ReplyDeleteMVP!
ReplyDeleteI have already put in my class
ReplyDeleteVery great design
Felicitaciones por este gran trabajo y muchas gracias.
ReplyDeleteCesar
ReplyDeleteExcelente trabajo, mis felicitaciones por tan generosa entrega.
Saludos!!
M.-
Good 2, !!!!!!!
ReplyDeleteExcelente aporte cesar, gracias por compartir..
ReplyDeleteVery simple!, very beautiful!, very practical!
ReplyDeleteThe effect was very good, looking forward to more features
ReplyDeleteThank you!
Wow..it's very cool. VFP Is Rock !
ReplyDeleteThank's Chesar ...
Great VFP Controls!
ReplyDeletehi Cesar, estoy enormemente agradecido y felicitaciones por los graficos
ReplyDeleteSaludos Luis antonio
Very Nice tool.
ReplyDeleteThanks
Excellent job! a gift for VFP community
ReplyDeleteZaheer
abnasir@gmail.com
Its a beautiful tool! Thankx a lot!
ReplyDeleteJust one question... hopefully not too stupid..
When I try to play around with it, it always says the first time:
"Error initiating class. Cannot find ...\source\gdiplusx.vcx"
It then offers "locate, ignore and cancel"
When I locate it manually it runs from then on..
Is there any way to avoid this?
Can you help?
Thankx
Excelente...!!!
ReplyDeletegracias por todo...
Cesar, Great Stuff.
ReplyDeleteJust updated my platform to Windows 7 OS.
Have started getting this error, only the first time click.
"Unknown Member System"
Error from "Form1.FoxCharts1.ChartCanvas.CreateOSB
Although the same runs flawlessly while in development stage?
StanleyPereira@Gmail.com
Hi Stanley,
Do you have VFP9SP2 installed ? Vista and Seven need SP2 to avoid problems.
I have using the Chart in VFP. I see this. This is excellent work and I required the donut chart files. and how to create in vfp
ReplyDeleteit is cool , but i have try to use foxchart in windows 8 , but i can't see the graphics , only when the projec is compiled. i f i use the application on vfp i see all graphics . what can i do ?
ReplyDeletePlease upgrade your VFP9 to SP2, that brings some needed fixes for Win Vista / Seven / 8
ReplyDelete