Foxite.COM Community Weblog

Foxite.COM Community Weblog - free weblog service for the Visual FoxPro Community.
Welcome to Foxite.COM Community Weblog Sign in | Join | Help
in
Home Blogs Forum Photos Forum Archives

VFP IMAGING



FoxCharts !!!

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



 

 


 













Published Friday, April 04, 2008 5:31 AM by cesarchalom
Filed Under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

xinjie said:

My God!
Thank you!
April 4, 2008 8:38 AM
 

Hamou Olivier said:

Hi Cesar,

Simply 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
April 4, 2008 9:55 AM
 

Dave Crozier said:

Excelent work once again Cesar.

VFP and GDI+ Rock!

Dave Crozier
April 4, 2008 10:44 AM
 

emersonreed said:

Terrific!
This will be very useful to VFP Community.

I don't know why you wasn't named an MVP yet!
April 4, 2008 1:27 PM
 

Tod McKenna said:

Holy Cowpie!

Great work!!! You've done it again Cesar!

Although my wife doesn't know it yet, I know what I'll be doing this weekend ;-)

April 4, 2008 1:35 PM
 

Malcolm Greene said:

Absolutely stunning!!! Thank you!
Malcolm
April 4, 2008 2:02 PM
 

Michael Babcock said:

Wow...great stuff!

What'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!
April 4, 2008 3:12 PM
 

Manjit said:

awesome dude....keep up the good work.
April 4, 2008 4:18 PM
 

Bernard Bout said:

Cesar

Absolutely Brilliant!!!

Need I say more?
April 4, 2008 5:02 PM
 

Rui Nogueira said:

Bom trabalho, César 

O grafismo é Muito Bom. Tomara que eu seja capaz de fazer qualquer coisa com jeito. Vou tentar experimentar.

Um abraço.
April 4, 2008 5:12 PM
 

Victor Espinoza said:

Cesar
Terrific work ... again :)

In my book you already are an MVP

VFP + GdiPlusX rocks!

Obrigado !!!
April 4, 2008 5:19 PM
 

Rui Nogueira said:

Hello, César

Quando 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

April 4, 2008 6:25 PM
 

Alex Grima said:

Impressive stuff. Will give it a shot
April 4, 2008 6:28 PM
 

Cesar Chalom said:

Thanks 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.

IMO, with the help comming from the community, FoxCharts can become a very useful and popular tool.


GdiPlusX Rocks !

April 4, 2008 7:48 PM
 

Furio Filoseta said:

Bravo Cesar!
April 4, 2008 11:37 PM
 

luisn said:

Simply brilliant, man you are awesome!!!
Thanks, thanks, thanks

Shine on you crazy diamond!!!
April 5, 2008 8:43 AM
 

Plinio said:

Uhhh, I don't know what to say.....
April 5, 2008 1:39 PM
 

foxpro.catalyst ?? » Blog Archive » FoxCharts said:

April 5, 2008 2:48 PM
 

Syed Nadeem Iqbal said:

Well done Cesar
April 5, 2008 3:45 PM
 

Chris-Jan said:

Thank you! Cesar!

But... 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... :-|

April 5, 2008 4:26 PM
 

Gaylen Junglng said:

Wow - Awesome in so many ways!!!!!!!!!!
April 6, 2008 1:53 PM
 

Rolando Rosales said:


thank you so much Cesar for this great tool!
April 6, 2008 2:33 PM
 

Kishore said:

Great work Cesar !! I'm loving Foxpro!
I too had the same thought like Emerson... why you wasn't named an MVP yet!
but no probs! you are MVP for all here..
April 6, 2008 7:41 PM
 

Saifuddin said:

No Words of expressing thanks, but simply thank you.
Kindly 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

 

April 7, 2008 2:20 PM
 

José Montero said:

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.

Muchas gracias por tan excelente trabajo,

José
April 7, 2008 6:01 PM
 

Alex Feldstein said:

Parabens César!

Excellent work. Looking good indeed!
April 7, 2008 6:58 PM
 

Rafa Reg said:

Parabéns Cesar! Excelente trabalho!
April 7, 2008 7:01 PM
 

tom said:

How to set up targets?
April 8, 2008 10:07 AM
 

tom said:

MVP!
April 8, 2008 10:08 AM
 

tom said:

I have already put in my class

Very great design
April 8, 2008 10:15 AM
 

Mik said:

Felicitaciones por este gran trabajo y muchas gracias.
April 8, 2008 3:35 PM
 

Mario said:

Cesar
Excelente trabajo, mis felicitaciones por tan generosa entrega.

Saludos!!

M.-
April 8, 2008 3:35 PM
 

TghFox said:

Good 2, !!!!!!!
April 8, 2008 3:37 PM
 

Victor Velasquez said:

Excelente aporte cesar, gracias por compartir..
April 8, 2008 4:43 PM
 

LoveFox said:

Very simple!, very beautiful!, very practical!
April 8, 2008 5:37 PM
 

foxfromchina said:

The effect was very good, looking forward to more features

Thank you!
April 9, 2008 6:36 AM
 

sinyonamakoe said:

Wow..it's very cool. VFP Is Rock !

Thank's Chesar ...

April 9, 2008 9:03 AM
 

Cesar Chalom said:

TrackBack http://akselsoft.blogspot.com/2008/04/vfp-imaging-foxcharts.html
April 9, 2008 9:41 PM
 

Cesar Chalom said:

TrackBack http://forum.dfpug.de/body.afp?!_2cc0ob26dmsgid=711926

April 9, 2008 9:41 PM
 

Cesar Chalom said:

April 9, 2008 9:41 PM
 

Cesar Chalom said:

April 9, 2008 9:42 PM
 

Serge said:

Great VFP Controls!
April 11, 2008 3:20 PM
 

luis said:

hi Cesar, estoy enormemente agradecido y felicitaciones por los graficos
Saludos Luis antonio
April 11, 2008 9:46 PM
 

Xjers said:

Very Nice tool.

Thanks
April 16, 2008 5:01 AM
 

Mohammad Zaheer said:

Excellent job! a gift for VFP community

Zaheer
abnasir@gmail.com
April 20, 2008 8:15 AM
 

Jac said:

Its a beautiful tool! Thankx a lot!

Just 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
April 24, 2008 11:43 AM
 

Zor said:

Excelente...!!!
gracias por todo...
April 24, 2008 7:03 PM

What do you think?

(required) 
(optional)
(required)