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 0.14 ALPHA released !

I'm happy to announce that FoxCharts has recently been accepted as a VFPX project.

Today I've just uploaded to VFPX at CodePlex a new version of FoxCharts. This is version 0.14 - still ALPHA - NOT FOR PRODUCTION !

Prerequisites:
Visual FoxPro 9 and the GdiPlusX library from VFPX 

First of all I have to thank you all for your kind comments and feedback you provided in my last post. I had never expected to receive so many comments, in this blog, at the other VFP forums and by email. I really apreciated that. Be sure that your feedback resulted in a superpowered motivation to improve it.

It is also important to tell everybody of the importance that both Bo Durban and Craig Boyd have in this project. They are the menthors and fathers of GdiPlusX. Without GdiPlusX this project would become almost impossible. If I had to use any other of the Gdi+ classes available for VFP, for sure it would have taken much more time - Believe-me, I've tried them all.

Using GdiPlusX I can be indeed much more productive. Once you understand how it works, things become really easy and simple.

At first sight, when I saw one of the first versions that Bo and Craig designed for GdiPlusX I was really amazed, and I said to myself - I have to go deeper into this.

Bo Durban has also provided important help, providing important suggestions, support and testing. Thanks also to EmersonReed, Luis Maria Guayan and Leandro Walfrans for your tips and support.

This version also distributes the two main files from GdiPlusX - System.app and GdiPlusX.vcx.
If you are already a GdiPlusX user, you can use your own GdiPlusX version.
Just make sure to be using the latest version.

This new release contains lots of enhancements:

Chart Types
- Bar charts
- Multiple bars
- Stacked bars

- Pie
- Doughnut

- Lines
- Area
- Points and Shapes


Color variations:
- Basic colors
- Custom colors
- Gradient colors
- Random colors
- Monochrome
- Gradient or solid colors


Legends in many places: Axys, shapes, side legends

Scales - automatic or customized

Customize:
- Titles
- Subtitles
- Backgrounds (solid or gradient)
- Fonts
- Colors

The sample form shows most of the features that are available. Run the form "ChartsSample.scx" and play changing the various properties, generating some cool charts like the ones below.

All the relevant codes are in the INIT() event of the sample form. With very few lines of code you can create super cool and beautiful charts.

This sample also includes a report sample. Check the codes in the command button that generates a report to see one of the various ways we have to print our charts.

 

Important to remember that this is still an ALPHA version, and is not recommended to be used in production although it works nice.

Some important improvements still need to be applied, specially in the class initialization. The codes also need to be optimized. My priority was in obtaining the results, and in many places the performance can be improved.

If you have any tips, or can provide suggestions, or fixes, you are most welcome !

Enjoy !

Download the latest version directly from the FoxCharts page on VFPX:

http://www.codeplex.com/VFPX/Wiki/View.aspx?title=FoxCharts&referringTitle=Home

The page for the latest release 0.14 Alpha:

http://www.codeplex.com/VFPX/Release/ProjectReleases.aspx?ReleaseId=12847

 

















 




 


 


 


 
  

 
 




 

Here are the properties that are currently provided in FoxCharts, that you can use to improve your charts:

SourceAlias Character, the name of the alias that contains the needed fields that will create the chart
FieldValue1 Character, the field name of the cursor that contains the numeric values that contain the values that will create the chart.
FieldColor Character, the field name of the cursor that contains the RGB values of the custom colors for the chart
FieldDetachSlice Character, the field name of the cursor that contains the logical values that tell if the slice of the Pie or Donut chart will be detached or not
FieldHideSlice Character, the field name of the cursor that contains the logical values that tell if the slice of the Pie or Donut chart will be hidden or not
FieldLegend Character, the field name of the cursor that contains the character values that contain the main legends of the Pie or Donut charts
FieldLegend2 Character, the field name of the cursor that contains the character values that contain the secondary legends of the chart that will be drawn inside the slice, or point or bar.
FieldXAxys Character, the name of the field that contains the text to be drawn in the X axys
Color1 Numeric, the RGB value of the color from the first chart
Legend1 Character, the Legend text for the first sequence of values
ChartType Numeric, type of chart: 1 = Pie ; 2 = Donut ; 3 = Unspecified ; 4 = Point ; 5 = Line ;  6 = Area ; 7 = Simple Bar ; 8 = Multiple Bars ; 9 = Stacked Bars
ChartsCount Numeric, the number of Value sources
FontName Character, the name of the font to be used to display text
TitleFontSize Numeric, the font size for the main title
TitleCaption Character, the title caption
TitleForeColor Numeric, the title and subtitle forecolor RGB value
SubTitleCaption Character, the subtitle caption
SubTitleFontSize Numeric, the subtitle font size
ShowLegend Logical, Shows the side legends
LegendFontSize Numeric, the fontsize for the side legends
LegendForeColor Numeric, the legend fore color RGB value
ShowValuesonShapes Logical, determines if the values will be drawn inside the shapes of the chart
LegendOnShapeColor Numeric, the RGB value for the shape color
LegendOnShapeFontSize Numeric, the font size for legends on shape
ShowAxys Logical, for Line, Area or Point charts - determines if the X and Y axys will be drawn
AxysXCaption Character, the main text for the X axys
AxysYCaption Character, the main text for the Y axys
AxysColor Numeric, the RGB value for the Axys main color
BackColor Numeric, RGB value of the main backcolor
BackColor2 Numeric, RGB value of the secondary (destination) backcolor. This is used to create gradients, together with "BackColor"
BackGradientMode Numeric, if gradient background (having BackColor2 specified) - 0 - horizontal; 1 - vertical; 2 - diagonal1 ; 3 - diagonal 2
ShowScale Logical, determines if the scale in the Y axys will be shown
Scale Numeric, the scale value for the Y axys; 0 = Automatic scale
ScaleBackType Numeric, the background scale type; 0 = none; 1 = lines; 2 = rectangle
ColorType Numeric, the type of colors of the chart: 0 = Basic Colors   1 = Custom (default)   2 = Random   3 = Scale of Gradients
BrushType Numeric, type of brush used to fill the chart: 1 - Solid Colors; 2 - Gradient Colors; 3 - Monochrome Hatch brush
GradientLevel Numeric, for gradient brush mode (-10 = destination black; 0 = solid color; +10 destination white)
AlphaChannel Numeric, 0-255 Determines the level of the transparency level; 255 = Opaque; 0 = transparent
_3D Numeric, the quantity of pixels that create the 3D effect (0 = plain)
Margin Numeric, specifies the margin width created in the text portion of the control.
DonutRatio Numeric, For Donut chart - the width of the donut related to its size ( 0.01 = full slice ; 0.99 = thin)
LineCaps Logical, for the case of plain line chart, shows rounded caps in each point.
LineShape
PointsShape Numeric, the shape to be used in a points chart: 0 = Round; 1 = Square; 2 = Triangle; 3 = Cross; 4 = Star; 5 = Man; 98 = GDI+X Path object; 99 = Custom Image
PointsShapeWidth Numeric, for Point chart, determines the width of the pen that will draw the shapes
PieDetachPixels Numeric, for Pie and Donut charts, the quantity of pixels to detach from center
BarsSpaceBetween Numeric, for bars chart - the distance in pixels between bars
Area3DTop Logical, when true, a line will be drawn on the top of the 3D Area chat
MultiChart Logical, determines if more than one kind of chart will run at the same time

 

 

Published Thursday, April 24, 2008 11:17 PM 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

 

Plinio said:

Guaooooooo!!!!!!
April 25, 2008 3:03 PM
 

Victor Espinoza said:

I second that!
WOW !
Great work Cesar
Thank you very much for all the time and effort you put into developing this and other useful and high quality classes, and, also for sharing them with the VFP community.


April 25, 2008 3:48 PM
 

Sridhar said:

Wow, amazing work, Thank you very much for the effort :)
April 26, 2008 9:39 AM
 

Ravi Kanth said:

It is really nice work Cesar.
Cesar Rocks :)
April 26, 2008 9:57 AM
 

tom said:

my God!
April 26, 2008 6:04 PM
 

Roberto Barros - BH said:

Simply the best!!!!!!!!!!!!!!!!
April 26, 2008 9:22 PM
 

mike said:

very good,I would like to FoxCharts 1.00 released
April 27, 2008 5:01 AM
 

xinjie said:

I look forward to its next version.

I had translated this article  into Chinese.Please forgive me.

You can visit the link below to see the Chinese version of it.
http://www.myf1.net.cn/bbs/dispbbs.asp?boardID=1&ID=295484&page=1

Thank you very much!

Hi Xinjie,

Feel free to translate any post from this blog to any language you want. All I ask you is to always send a comment here telling the URL that contains the translated article, so that other people that are native to your language can benefit from it too.

Thanks very much!

April 27, 2008 3:03 PM
 

xinjie said:

Thanks again!

I will written link address in comments of the corresponding article if I translate it.
April 27, 2008 6:16 PM
 

Maurico Pulla said:


IMPRESIONANTE....

Realmente es un muy buen trabajo

Gracias Cesar

Mauricio
April 30, 2008 1:31 AM
 

fosiltea said:

sooo ... great
May 4, 2008 11:43 AM
 

xiaozhang said:

FoxCharts !
May 7, 2008 12:53 PM

What do you think?

(required) 
(optional)
(required)