Click here to Skip to main content
11,411,494 members (63,978 online)
Click here to Skip to main content

Tagged as

How to draw charts in using MS chart

, 18 Oct 2011 CPOL
Rate this:
Please Sign up or sign in to vote.
This is an old version of the currently published tip/trick.


This article describes u about how to draw a chart in using MS chart.First we need to install MS chart Software in our system.Here is a link for downloading MSChart.[^]

Refer following link for Installing MS chart adding into vs 2008 toolbox and using MS chart with sample code[^]

After adding ms chart into toolbox Double click on chart control in your toolbox.Chart will be added in your web page like the following.
<asp:Chart ID="Chart1" runat="server">
        <asp:Series Name="Series1">
        <asp:ChartArea Name="ChartArea1">
If we wanted to represent more than one atribute then we need to add
<asp:Series Name="Series2" ChartArea="ChartArea1"  Color="#000066">                 
<Series> </Series>

Function for creating a chart-

private void fillTempPulseEtc()
                double[] temp = { 0.0, 111.0 };
                double[] time = { -23.0, 23.59 };
                for (int i = 0;i <= 2; i++)
                    Chart1.Series[0].Points.DataBindXY(time, temp);
                Chart1.Series[0].ChartType = System.Web.UI.DataVisualization.Charting.SeriesChartType.Column ;
In page load call fillTempPulseEtc() We can select Pie, Point, Area, Doughnut etc charts using
System.Web.UI.DataVisualization.Charting.SeriesChartType.Column ;


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


About the Author

raj ch

India India
No Biography provided

Comments and Discussions

Discussions posted for the Published version of this article. Posting a message here will take you to the publicly available article in order to continue your conversation in public.
QuestionCharts can be created by using chart control and Series PinmemberMember 1096996515-Oct-14 21:47 
GeneralVery good reference. Pinmemberdanilo_ga2-Jan-13 2:37 
GeneralMy vote of 4 PinmemberTariq Newaz Shahriar19-Apr-12 15:49 
GeneralRe: My vote of 4 Pinmembersupriya chaladi19-Apr-12 22:34 
GeneralReason for my vote of 4 nothing Pinmembermbsmbs24-Oct-11 21:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150414.5 | Last Updated 19 Oct 2011
Article Copyright 2011 by raj ch
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid