Click here to Skip to main content
12,299,917 members (53,161 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL-Server
HI,

I am new in MS Chart but i want to a chart with database. I found many article on net but my requirement is different.
In My database I have table "UserTAT" and its Column Name is "INTAT" , "OUTTAT" , "PASSTAT"
and these column contain only integer value. like this.

Table Name: - UserTAT

Column Name: INTAT OUTTAT PASSTAT
Row Value : 2 4 10
4 6 20

Now i want to column name in x-aisx and column value in y-asix. Please Help me to solve this problem. Please check image link to see chart type i want. Help.
http://rashtriyasakshartamission.com/chartsample.png

Thanks
Posted 13-Jan-13 6:51am
Edited 13-Jan-13 9:58am
v3
Comments
NeerajBhagat09 13-Jan-13 16:18pm
   
Do you want the graph for a single row?
ram_kumar 14-Jan-13 11:24am
   
yes sir
jkirkerx 13-Jan-13 19:22pm
   
Are you doing this in code behind, pure code, or are you using the control object in design view?

Are you using 3.5 or 4.0?
ram_kumar 14-Jan-13 11:23am
   
I am using 4.0
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

I assume your using the design view to build your chart

First, you need to know that there is the chart and there are series.

You place the chart object on your webform first, and size it, and then paint it, using the properties F4. When you have designed your chart, then you can build series, which are the data points. So start with adding manual data points first to learn how to build a series.

When you chart looks good, now you can attach your data to the chart.

So now you go to the code behind page, and make a reference to the chart, in which you create a new series, and then add the series to the chart.

The link below shows how to write code for series, and attach it to the chart.


http://www.mschartcontrol.blogspot.com/[^]
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160525.2 | Last Updated 26 May 2015
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100