Click here to Skip to main content
15,895,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello
I have project that saved some data in database access and I want to draw these data in graph(Bar chart). I try many code to draw chart and represent the data on it but it doesn't work.
Please can you help me to draw bar chart and plot tha data from access on it.
Posted

Your question is unanswerable because we can't divine what you code looks like by reading tea leaves. Try using the free Microsoft charting stuff for .Net.

http://www.microsoft.com/downloads/details.aspx?FamilyId=130F7986-BF49-4FE5-9CA8-910AE6EA442C&displaylang=en[^]
 
Share this answer
 
As far as I remember the 'standard' C# toolbox doesn't have a chart control, so the one you are adding to your app must be an addition. Therefore we still do not know what chart you are using.

Bearing this in mind the only thing that I can suggest is the following.

When you add the chart to your form a line will be added to the MyForm.designer.cs file that will look something like
SomeTypeOfChartClass whateverYouNamedYourChart;


If you copy the bold underlined bit (from your file, not from here) and paste it into the search box on Google/Bing, I'm sure that you will find lots of useful information.

From what you have asked so far, it would seem that you might be a little out of your depth, waiting to be spoonfed by the members here will not help you as much as doing your own research will.

Good luck! :)
 
Share this answer
 
I use chart from toolbox in c# and I want to read data from access and represent these data in bar chart.I write code which is
String text= "SELECT COUNT(ID) FROM Reading";
I want the reslut to display in chart.
 
Share this answer
 
Comments
Henry Minute 17-May-10 7:48am    
Showing how you get the data is good, but what do you do with it then? You need to show us the code that passes your data to the chart control, otherwise it is doubtful if anyone can help you.
BryanWilkins 17-May-10 14:43pm    
What is up with your comment showing the spaces as " "? Is there a bug in the comment field here or is this on purpose.
My question is how to give different color to the chart and draw 2D chart not 3D chart?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900