473,327 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Creating A chart or graph

Hi,
Have a quick question: Lets say I have a Hashtable of
values hence
56 37.890
1 12.768
5 9.764
etc....
Is there a way for me to draw a chart in C# of this. FYI
its actually lottery numbers and the percentages of how
often they have repeated. I fugured this would be a good
project to teach myself the language (i read the numbers
off an Excel spreadsheet). I could give the full jist of
the program I am writing ut it would take up too much
space (if you would like to know post your email address
and Im more than willing to discuss). Thanks for any help
or pointing me to the appropiate place in the
dicomentation.
Thanks,
Homer (c# newbie)

Nov 16 '05 #1
2 2771
Homer,

There are no charting classes provided with the .net framework (to my
knowledge anyway), but there are numerous third party controls available.

However, an interesting learning excercise would be to create your own bar
chart window. I would suggest you use Panel controls dynamically placed into
the window, each with a different BackColor. You can then set the size of
these based upon the value for each lottery number.

If you arent sure how to programmatically add the controls - create a new
form and place a panel control on it (with a background colour set), then
take a look in the generated InitializeComponent() method (you will need to
expand the "Windows Form Designer generated code" region to see this) and
examine how visual studio creates this panel control and add it to the list
of form controls.

From the above you should then be able to see how to create your own array
of panel controls, colour them and size them accordingly and add them to your
form. (Note you should do this in the constructor after the call to
InitializeComponent. Do not add anything in InitializeComponents as VS will
stomp on this when you next change the form).

Once you start to find your feet a bit more, you might look into creating a
Windows Control Library and encapsulating the bar chart code into your own
generic bar chart control!

Hope this helps,
Chris.
"Homer" wrote:
Hi,
Have a quick question: Lets say I have a Hashtable of
values hence
56 37.890
1 12.768
5 9.764
etc....
Is there a way for me to draw a chart in C# of this. FYI
its actually lottery numbers and the percentages of how
often they have repeated. I fugured this would be a good
project to teach myself the language (i read the numbers
off an Excel spreadsheet). I could give the full jist of
the program I am writing ut it would take up too much
space (if you would like to know post your email address
and Im more than willing to discuss). Thanks for any help
or pointing me to the appropiate place in the
dicomentation.
Thanks,
Homer (c# newbie)

Nov 16 '05 #2
Hello,

One advantage of picking VB.NET to develop in, is the large quantity of 3rd
party controls to save you time and energy.

Check out ProEssentials at www.gigasoft.com.

We offer a Lite version for $149, Std for $399, and a Pro version for $1299.
The Lite version will likely handle your needs and provide powerful charting
to embed into your projects. Features like a) optimally utilizing control
real-estate given the chart's shape and data, b) zooming, c) exporting
images and data, d) maximization, and much more.

best regards,

Robert Dede
Gigasoft, Inc.


"Homer" <Ho***@discussions.microsoft.com> wrote in message
news:16**********************************@microsof t.com...
Hi,
Have a quick question: Lets say I have a Hashtable of
values hence
56 37.890
1 12.768
5 9.764
etc....
Is there a way for me to draw a chart in C# of this. FYI
its actually lottery numbers and the percentages of how
often they have repeated. I fugured this would be a good
project to teach myself the language (i read the numbers
off an Excel spreadsheet). I could give the full jist of
the program I am writing ut it would take up too much
space (if you would like to know post your email address
and Im more than willing to discuss). Thanks for any help
or pointing me to the appropiate place in the
dicomentation.
Thanks,
Homer (c# newbie)

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Alex Grichener | last post by:
I want to output a graph to the screen (X-axis, Y-axis, and all of the other things that constitute a graph), that will continuously plot something as time goes forward. So I will be constantly...
9
by: Patrick.O.Ige | last post by:
I have a code below and its a PIE & BAR CHART. The values now are all static but I want to be able to pull the values from a database. Can you guys give me some ideas to do this? Thanks ...
1
by: Robin Tucker | last post by:
Hi, I am embedding various things into a Microsoft Word document. I want to embed and automate a chart control. I can embed an Excel.Chart.8 into my Word document manually (no problemo), but...
1
by: Saintor | last post by:
This is for A97 in runtime or MDE mode. My intent was to define a temporary query using the recordsetclone property / filter / orderby. The controlsource of my chart would be based on a grouped...
7
by: vbnetdev | last post by:
My boss wants this done in a day. I would be happy with a week! Anyway, I have a dataset filled with data and need to populate an MS word chart with it when writing a report. Any tutorials or...
5
by: Kuna | last post by:
Hi All, I am trying to create a gantt chart in php by getting data from database. I am using WindowsXp OS and having php-4 and my-sql DB. I have installed the JPGRAPH package to my system and...
3
by: The Frog | last post by:
Hi guys, I have never touched really on this area before with forms and reports, and now I would like to be able to incorporate some graphs / charts for a new little app I am building, and I...
0
by: eureka2050 | last post by:
Hi all, I am creating a radar chart containing 2 plots using jpgraph. My code is as follows:- include ("./jpgraph/src/jpgraph.php"); include ("./jpgraph/src/jpgraph_radar.php"); //...
0
by: gpalade | last post by:
Hy, i'm using c# to create a powerPoint presentation that contains charts. I've added the chart(s) using Graph.Chart, it looks like this: Graph.Chart objChart =...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.