Adding Graphs to Forms

042355C

Active member
Joined
Nov 30, 2006
Messages
30
Programming Experience
Beginner
Hi to all,

I am doing a windows application programme on Health using vb.net 2003. Right now, my task is to create a graph to display the number of people within a range of blood pressure. The number of people is in my database(ODBC).

I really really need help in this. All the websites I visit needs me to enter the exact value, which means I will have to change when the number in database changes.

Is there anyway to create a graph whereby it will correspond according the the database?

Thanks a million!
 
Last edited:
i already retrieved the values into textbox. i just need it to get the value from the textbox. sigh...i'm moving nowhere again. this is so depressing..:(
 
haha, its ok mate just hang in there.

couldnt you just redirect the values from the textbox to go to the chart instead (by putting the information that was going to go into the textboxes into a dataset or some such thing)

tell you what, if you tell me which charting component you picked, ill get it, download and have a quick look at it to see how to do what you want ok?

so which ones that jmc told u about did u use?

regards
adam
 
haha, its ok mate just hang in there.
I'm trying very hard to hang in...sigh

couldnt you just redirect the values from the textbox to go to the chart instead (by putting the information that was going to go into the textboxes into a dataset or some such thing)
I tried. the value is gotten through executeReader. Plus I got 5 different values to pass.

tell you what, if you tell me which charting component you picked, ill get it, download and have a quick look at it to see how to do what you want ok?
That would be great. Also very super thanks to you.

so which ones that jmc told u about did u use?
I'm using Zedgraph, since NPlot can only give line graph. I need it to be either histogram or bar chart though...:(
 
Last edited:
no problems mate,

is there a pressing matter of time? i am kinda at work at the moment :eek: i could get back to you either much later today or tomorrow morning?

that ok?

have a good one
 
I have till this friday to get the chart up and running. So, should be considered as pressing for time also? :p anyway, i cannot be demanding, since i am the one asking for help, eh?:)
 
hey mate

can you put a screen (in jpg format) of your form, and the loaded information inside the form, as well as a description of what you want out of the graph?


btw. this zedgraph thing looks pretty damn good, i recommend once you finish this project, you actually have a serious look at this, it seems pretty powerful once you learn how to use it (the documentation shows how it can be used)


cheers mate
 
I'm sorry. My files are all in school. Today I'm terribly sick, therefore unable to go to school. There are 5 values that I get from the database( 222,16,22,4,0). The values are gotten using sql statement (Select Count).
 
jeez mate, thats not good, hope u get better soon.

a bit of bad news im afraid... i have been unable to get some time to look at your project properly. but i think i can point you in the right direction... i have attached to the post one of the sample projects that jmc was talking about in a few posts previous. i think its the closest to your solution that comes with the documentation.

in this, you should have a look at line 30 of the form, because there it shows how to add values to the graph. this would be where you need to reference your textboxes in order to add the values to your graph.

once you add the dll to your project you should be able to find the control somewhere in the choose items dialog box for the toolbox.

simply add the the 'ZedGraphControl' which is what its called, and look very carefully over the code in the Form_Load (almost every step is commented really well) event, which shows you how to do pretty much everything you need to do, and simply adapt it to your project. i think if i would have had a bit more time (and also all of the information, as i didnt know how the data was supposed to related to each other) i would have been able to help you properly, and for that again i apologise, hopefully this will help a bit (it really should)

if it gets hard, dont despair just keep trying, as from what i can see this is a really powerful tool when the user has the necessary knowledge, so just hang in there ok?

have a good one mate, and get better soon.

regards
adam
 

Attachments

  • vb2005.zip
    13.3 KB · Views: 39
Last edited by a moderator:
Thanks for your guidelines. I will try to understand it. However, Would it help if I pass you the program? Then from there, you try to see if you can help me further? My understanding vb.net is very limited, therefore unsure if I can really solve it myself :(
 
study the sample project that was uploaded yesterday, and if you are still having alot of trouble, i would be glad to help.

probably be done on sunday if thats ok?

have a good one mate
regards
adam
 
yep, no problem. But I think while sleeping yesterday, I got the concept drawn out already :D . I believe, I should be able to solve it. If I can't, then hey pal, I'll seriously need your help :D
 
Sorry pal, I cannot open it using vs.net2003. Is it ok if I attach my vb file to you? It's using vb.net 2003 though...
 
Back
Top