This project is read-only.

FoxChart

Topics: Enhancement Request
Aug 4, 2008 at 3:53 PM
Hello,

may it be possible to add a Logo (Left / Right) at the Top of the ChartPage and a Footer with additional Informations (Print Date, User...)

Many Thanks

Klaus Hentschel
Aug 4, 2008 at 5:14 PM
Edited Aug 4, 2008 at 5:17 PM

Hi Klaus,

I think I'll add a method in FoxCharts to allow users to access directly the oGfx object and make some modifications, as your request.

So FoxCharts may receive a new method, eg: "AfterDraw()".
FoxCharts will process it after the whole chart was drawn, but still not exibited in the image object.
There you could add some drawing codes, to make it fit to your needs, like in your case:


LOCAL loBmp as xfcBitmap
loBmp = .Bitmap.FromFile(GETPICT())
This.oGfx.DrawImage(loBmp, 0, 0) && the image will be drawn at the coordinate (0,0)


 

But this way, you'll be drawing things over the original chart. It will not move the chart down or to the right in order to make sure the image will fit.

Will that be enough for you ?

Aug 4, 2008 at 5:37 PM
Hi you,

for now that will be OK :-). Many thanks to you. Could i ask when the next Release is downloadable?

Bye for now

Klaus
Aug 4, 2008 at 6:07 PM
Edited Aug 4, 2008 at 6:08 PM
>>Could i ask when the next Release is downloadable?

By tomorrow !
The latest version, still unpublished can be reached here:
http://www.codeplex.com/VFPX/Release/ProjectReleases.aspx?ReleaseId=15318

The only modification that I'm planning to add is your request, that is really simple to apply.
I hope to add a sample showing how you can do this, adding the VFPX logo to the top left portion of the chart.

Regards

Cesar
Aug 5, 2008 at 9:12 AM

Hi Cesar,

another Question, regarding FoxChart :-) (BTW.: it is so fantastic!)

I have build a chart with 3 Lines. All Lines are between a Value from 200 to 300. The Y Axis goes from a Value 0 to 320. So all Lines are in the Upper Range of the Chart. Is it possible to start from a positive Y Axis Value (here maybe 160) and NOT 0?

Many Thanks

Klaus

Aug 5, 2008 at 11:59 AM
Hi,

Excellent work on the charts!

Is there any plans for dual function plotting (in particular - two y-axis)?

Keep up the good work

Chad
Aug 5, 2008 at 3:10 PM
Edited Aug 5, 2008 at 3:27 PM
Hi Klaus,

Thanks for the kind words :-)

>>...Is it possible to start from a positive Y Axis Value (here maybe 160) and NOT 0?

Not yet, but for sure this will be available soon. I hope to add a property, maybe "ScaleStart", that will allow users to define the starting point of the chart.

Regards

Cesar
Aug 5, 2008 at 3:33 PM
Hi Chad,

>>Is there any plans for dual function plotting (in particular - two y-axis)?

I didn't get what you need here... Can you provide an image with a chart showing what you are looking for ?

Regards

Cesar
Aug 6, 2008 at 2:49 AM
VfpImaging,

Here is an image of a chart with two y-axis...

http://www.swiftchart.com/mline_ex2.png
Aug 6, 2008 at 8:53 AM
Thanks Craig.

This site also has many examples: http://www.fusioncharts.com/GalleryCombiDY.asp

Chad
Aug 6, 2008 at 11:11 AM
Edited Aug 6, 2008 at 11:48 AM

Hi Cesar,

I'm fond of your charts. My own charts are much simpler but have few tricks that may be interesting for you (IMHO).
1. While drawing chart I fill array with shape coordinates. So, I can react to mouse Enter, Leave, Click ... on chart shapes.
For example, for pie chart with mouse click on slice I can attach/detach slice.

2. With small button on the right top corner I can show/hide container like your PF. (For saving chart space)

3. When chart style can show only one chart row (like your pie, bars) I use combobox to select row number to show.

4. If it's possible I use wordwrap for legenda to save some space for chart.

I hope you can easily add Foxcharts2 to show two charts with different style at same time.
Optionally, of cource.
Say, bars and pie. And only one with legenda.

Regards

Yudin, Kiev, Ukraine
Aug 8, 2008 at 4:19 AM
Edited Aug 8, 2008 at 4:30 AM
Klaus,

I've added the method/event "AfterChart" to the FoxCharts class.
It will be fired immediately after the chart is drawn by GDI+, but still not sent to tje image object.

So, at this moment you'll be able to perform some global image transformations, or draw something else to the chart.
Immediately after this method, FoxCharts will send the image binaries to the PictureVal property of the Image object.

For your case, you can add the following code sample to the "AfterChart" event, to draw an image to the top left portion of the chart.

Hope this helps !
As I said before, please go to the "Planned" next release to get this still unpublished version.
http://www.codeplex.com/VFPX/Release/ProjectReleases.aspx?ReleaseId=15318


LOCAL

loGfx as xfcGraphics

 

loGfx = This.oGfx

 

 

 

WITH _Screen.System.Drawing

 

 

loGfx.DrawImage(.Bitmap.

FromFile("\Images\vfpxpoweredby_alternative.Gif"),0,0)

 

 

 

ENDWITH

Aug 8, 2008 at 7:05 AM

Hi Cesar,

many thanks for your work. i will try it out this weekend.
do you know when you have time to think about the "start from a positive Y Axis Value" (you told about a ScaleStart)?

Kind Regards

Klaus

Aug 8, 2008 at 2:05 PM
Klaus,

>>do you know when you have time to think about the "start from a positive Y Axis Value" (you told about a ScaleStart)?

Yes, it is still primitive, but already working.
Try changing the property "ScaleStartValue".

In the "FoxCharts_Sample_New" form, in the Axis tab, you'll find how to change it on the fly...

It is not completely finished, I still have some adjustments there, but is working.

Let me know what you think !

Cesar


Aug 8, 2008 at 6:20 PM

Hi Cesar,

 

ok, i find the point where to do. When i click to fill the ScaleStartValue nothing happen, is that right? Only when i also Check the Show Line Zero i see the "Zero Line" at the Value of ScaleStartValue. What i hoped to get is that the whole Chart is "coming down" to this value. I mean the first value that i see is the ScaleStartValue because now my Chart is on the Top of the Chart. I hope my simple Example show you what i mean :-)

Klaus


       |     _______             ________________
       |__|              |______|
       |
100 |------------------------------------------------
       |
       |
       |
0     |__________________________________________

       |
       |
       |
       |
       |     _______             ________________
       |__|              |______|
       |
100 |__________________________________________

Aug 12, 2008 at 4:56 AM

Hi Klaus,

Yep !

I got what you meand here, and I think it works at this moment.

In my tests, first I adjusted data, for example, moved all data to values between 100 and 120

Then set the property "ScaleStartValue" to 100, to see the results. Hope it works as desired !
Regards
Cesar

Aug 12, 2008 at 4:59 AM

Red and Craig,

Thanks for the pictures!

I'm starting to get scared :-D... I think I'll never manage to get finished with this stuff.

I'll study how I can implement this in future versions.

Thanks again !

Aug 12, 2008 at 5:13 AM

Hi Yudin,

Thanks a lot for your comments.

For the future, even if you plan to reply to this message, please open a new "discussion topic". This will make easier to discuss and to track the messages.

>>1. While drawing chart I fill array with shape coordinates. So, I can react to mouse Enter, Leave, Click ... on chart shapes.

Yes, this is definitely in my plans. I just still have not decided what will be the best way to detect the mouse position in the chart. I thought of 2 options:
1 - Add some invisible objects to the charts container, each of them with the same position and measures of the bars drawn, and control easilly the mouse events
2 - Create an array or cursor with the positions, coordinates of each shape from the chart.

For Pies / Doughnuts, the best solution is to obtain the angle position to know which slice is selected. I already made it work for these cases, but it still needs some few adjustments... I have to find some time to implement them definitely :-)


>>For example, for pie chart with mouse click on slice I can attach/detach slice.

Fantastic !
For sure I'll add this feature - THANKS !!!


>>2. With small button on the right top corner I can show/hide container like your PF. (For saving chart space)

This has been already suggested by Jim Nelson as well.He suggested to have another class or classes that can be tossed in our forms or even in the FoxCharts container that will make it easier for users to manipulate the charts.

CAN YOU HELP ME WITH THIS ?


>>3. When chart style can show only one chart row (like your pie, bars) I use combobox to select row number to show.

Another great idea ! Thanks


>>4. If it's possible I use wordwrap for legenda to save some space for chart.

Titles, subtitles, and the main X and Y axis legends already support that.


>>I hope you can easily add Foxcharts2 to show two charts with different style at same time.
>>Optionally, of cource.
>>Say, bars and pie. And only one with legenda.

Yes, that's in the row too... I just can't see when it will be available...


I apreciate your suggestions very much.
I'd love to see what you have done so far, maybe your work could helps us to save some time here ?

Regards

Cesar

Aug 12, 2008 at 8:53 AM
Hi Cesar,

many traffic on your FoxCharts. That shows that many people wait for something like this :-)
The new Property ScaleStartValue works very fine. Now my Chart looks like i want to. Very good job!

Bye for now

Klaus
Aug 12, 2008 at 12:36 PM
Hi Cesar,

a know you have much to to.

Now as i ship the Chart into production the user ask for something special. I made a Chart with data for all days of a month. The user has to print it out every day. For a whole month (07.2008) the Chart is complete but for the 08.2008 the Chart is only filled with data till 12.08.2008. Now the Chart ends on this day. May it be possible to fill the data with a .NULL. Value and so the X-Acis goes to the 31.08.2008 but the Charts stops at the Day with Real Numbers?

Thank you

Klaus

BTW.: Also the Logo is placed now as Bitmap on the Chart (you remember - AfterChart - )
Aug 20, 2008 at 5:06 AM
Hi Yudin,

>>. When chart style can show only one chart row (like your pie, bars) I use combobox to select row number to show.

DONE !
Added new property "ChartRow".
Just pass a numeric value to this property in order to see the chart using the desired data.
Added a Spinner to "ChartsSample_New", in the "Style" PageFrame, alowing to switch between the rows of data for Simple Bars (Horizontal and Vertical), Pie and Doughnut charts.

Thanks for the suggestion !
Aug 26, 2008 at 1:25 PM
Hi Cesar, good job!
Have you seen my http://www.codeplex.com/VFPX/Thread/View.aspx?ThreadId=33342 ?