Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 7th, 2008, 05:27 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma
Default

It looks like a dicussion on on-the-fly-generated Charts, I saw Dundas Charts being mentioned towards the beggining of this thread. If its just that , any particular reason you haven't tried Google Chart APIs yet? Still in its infancy but you will see some good work done by Google people there.
May well have put Dundas on its way to phasing out.

In a matter of as simple as decorating the <IMG tag properly, you get your chart image ready.

Learn more here
http://code.google.com/apis/chart/

Do the job for most purposes, they are FREE.

Regards
Ankur
 
Old March 7th, 2008, 05:47 AM
Friend of Wrox
 
Join Date: Sep 2007
Posts: 169
Thanks: 7
Thanked 2 Times in 2 Posts
Default

Quote:
quote:Originally posted by Ankur_Verma
 It looks like a dicussion on on-the-fly-generated Charts, I saw Dundas Charts being mentioned towards the beggining of this thread. If its just that , any particular reason you haven't tried Google Chart APIs yet? Still in its infancy but you will see some good work done by Google people there.
May well have put Dundas on its way to phasing out.

In a matter of as simple as decorating the <IMG tag properly, you get your chart image ready.

Learn more here
http://code.google.com/apis/chart/

Do the job for most purposes, they are FREE.

Regards
Ankur
Yes Dundas Charts was passed around but I don't want to pay for charting stuff.

I have looked at a couple free ones but never the google one. The thing I found was they where not very customizable. Like the chart I want to do is a chart I never really seen. Like I have seen stacked charts before but they are always on every column. I only want it to be on one column.

They might be able to be customizable but there documentation was so poor that it was impossible to figure it out.

I don't know if this google stuff would allow me to alter there charts so that I could make this new kind(it might not be new but it does not seem to be a standard chart) of chart I want to make.

 
Old March 7th, 2008, 07:15 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma
Default

Quote:
quote:Originally posted by chobo2
Like the chart I want to do is a chart I never really seen.
Well, that makes it really hard if not impossible for me to know how you picture it. But thats okay, you may have a novel idea for how you want your chats. Why dont you draw a loose sketch of it and tell me how you see it

Quote:
quote:Originally posted by chobo2
They might be able to be customizable but there documentation was so poor that it was impossible to figure it out.
That goes without saying, you expect it if they require more work on YOUR part because you see they are FREE. But you are right, and like I said they are still in their infancy, customisable they ARE, 'very' customizable, they may not be.

Regards
Ankur
 
Old March 7th, 2008, 05:21 PM
Friend of Wrox
 
Join Date: Sep 2007
Posts: 169
Thanks: 7
Thanked 2 Times in 2 Posts
Default

Quote:
quote:Originally posted by Ankur_Verma
 
Quote:
quote:Originally posted by chobo2
Quote:
Like the chart I want to do is a chart I never really seen.
Well, that makes it really hard if not impossible for me to know how you picture it. But thats okay, you may have a novel idea for how you want your chats. Why dont you draw a loose sketch of it and tell me how you see it
I did draw it out twice. I guess you missed both links?


This is how my first rough photoshop draft.

http://img217.imageshack.us/img217/9...artcopyxe1.jpg

This is what my code makes: http://img160.imageshack.us/img160/7151/chartvh2.jpg


 
Old March 7th, 2008, 05:46 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Ultimately this is going to come down to Math on your part. You need to figure out what the correct equation is for defining the upper left corner and lower right corner of your rectangles.

My observations are as follows: The lower right hand corner y position of any of the blue or red rectangles will be where the base line of your chart falls (the x coord will slide obviously). The lower right hand corner of the green rectangles will be the X,Y coord of the upper right hand corner of the blue rectangle (or red for that matter).

Does this help?

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========
 
Old March 7th, 2008, 05:55 PM
Friend of Wrox
 
Join Date: Sep 2007
Posts: 169
Thanks: 7
Thanked 2 Times in 2 Posts
Default

Quote:
quote:Originally posted by dparsons
 Ultimately this is going to come down to Math on your part. You need to figure out what the correct equation is for defining the upper left corner and lower right corner of your rectangles.

My observations are as follows: The lower right hand corner y position of any of the blue or red rectangles will be where the base line of your chart falls (the x coord will slide obviously). The lower right hand corner of the green rectangles will be the X,Y coord of the upper right hand corner of the blue rectangle (or red for that matter).

Does this help?

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========
Hmm I thought it would be coming to math...I don't quite follow what your saying math was never my strong subject. So some some examples would be nice if possible.

 
Old March 7th, 2008, 06:03 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Hmmm. I think this link will help you best understand the coord system of GDI+

http://www.informit.com/articles/article.aspx?p=102607


================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========
 
Old March 7th, 2008, 06:56 PM
Friend of Wrox
 
Join Date: Sep 2007
Posts: 169
Thanks: 7
Thanked 2 Times in 2 Posts
Default

Quote:
quote:Originally posted by dparsons
 Hmmm. I think this link will help you best understand the coord system of GDI+

http://www.informit.com/articles/article.aspx?p=102607


================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========
So I been reading it. I stopped after page 3 since I don't think at this second the other pages will help me out.

So I sort of understand a little bit better how the stuff works.

I been reading on page 3 about these matrices and how you can use them to scale stuff.

I am wondering should I be using this? I been trying to use them but every time I scale stuff down it scales the whole image down so I am not sure if I got to make 2 separate Graphics objects or what I got to do.

 
Old March 7th, 2008, 07:07 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Ok. When you create your original Bitmap (canvas) to draw on it has a size of, lets say 400x400, so:

The upper left corner of that canvas will be 0,0 while the lower right corner will be 400,400.

For the sake of argument lets say the base line of your chart is 400, or at the bottom of your canvas. To draw a rectangle that would ascend to the top of the canvase you would have to define your rectangle with coords similar to this:

50, 400, 50, 200

That should send you in the right direction. (For the time being you shouldnt worry about scaling)

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========
 
Old March 7th, 2008, 07:19 PM
Friend of Wrox
 
Join Date: Sep 2007
Posts: 169
Thanks: 7
Thanked 2 Times in 2 Posts
Default

Quote:
quote:Originally posted by dparsons
 Ok. When you create your original Bitmap (canvas) to draw on it has a size of, lets say 400x400, so:

The upper left corner of that canvas will be 0,0 while the lower right corner will be 400,400.

For the sake of argument lets say the base line of your chart is 400, or at the bottom of your canvas. To draw a rectangle that would ascend to the top of the canvase you would have to define your rectangle with coords similar to this:

50, 400, 50, 200

That should send you in the right direction. (For the time being you shouldnt worry about scaling)

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========
I am kinda confused Here. What direction is this suppose to send me on with?

Is there something wrong with the way my coordinates are currently?

Also I tried to do your example(maybe I missed something but it does not work)

Code:
        Bitmap myImage;

        /* make my Bitmap 800 by 600 */
        myImage = new Bitmap(400, 400);

        // Get the graphics context for the bitmap.
        Graphics objGraphics = Graphics.FromImage(myImage);

        objGraphics.Clear(Color.White);

        objGraphics.FillRectangle(Brushes.Black, 50, 400, 50, 200);





Similar Threads
Thread Thread Starter Forum Replies Last Post
charts MunishBhatia ASP.NET 2.0 Professional 0 May 28th, 2007 11:52 AM
about charts MunishBhatia ASP.NET 2.0 Professional 1 May 11th, 2007 05:40 AM
Charts in Access lryckman Access VBA 5 December 11th, 2006 09:17 AM
charts s_gh Excel VBA 1 May 31st, 2006 09:53 AM
OWC making Excel with bar charts mondayisgreat Classic ASP Components 0 March 2nd, 2006 02:24 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.