<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Alex Gorev's Weblog : ASP.NET</title><link>http://blogs.msdn.com/alexgor/archive/tags/ASP.NET/default.aspx</link><description>Tags: ASP.NET</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Charting With ASP.NET and LINQ</title><link>http://blogs.msdn.com/alexgor/archive/2009/03/06/charting-with-asp-net-and-linq.aspx</link><pubDate>Fri, 06 Mar 2009 20:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9463178</guid><dc:creator>alexgor</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/alexgor/comments/9463178.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alexgor/commentrss.aspx?PostID=9463178</wfw:commentRss><description>&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/ChartingWithASP.NETandLINQ_8992/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/ChartingWithASP.NETandLINQ_8992/image_2.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; MARGIN: 5px 20px 0px 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=71 alt=image src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/ChartingWithASP.NETandLINQ_8992/image_thumb.png" width=139 align=left border=0 mce_src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/ChartingWithASP.NETandLINQ_8992/image_thumb.png"&gt;&lt;/A&gt; Check out the new MSDN article about how to use ASP.NET Chart control with LINQ by K. Scott Allen: &lt;A title=http://msdn.microsoft.com/en-us/magazine/dd453008.aspx href="http://msdn.microsoft.com/en-us/magazine/dd453008.aspx" mce_href="http://msdn.microsoft.com/en-us/magazine/dd453008.aspx"&gt;http://msdn.microsoft.com/en-us/magazine/dd453008.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Alex.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9463178" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alexgor/archive/tags/Chart/default.aspx">Chart</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/MSDN/default.aspx">MSDN</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/LINQ/default.aspx">LINQ</category></item><item><title>Data Binding Microsoft Chart Control</title><link>http://blogs.msdn.com/alexgor/archive/2009/02/21/data-binding-ms-chart-control.aspx</link><pubDate>Sat, 21 Feb 2009 05:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9436859</guid><dc:creator>alexgor</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/alexgor/comments/9436859.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alexgor/commentrss.aspx?PostID=9436859</wfw:commentRss><description>&lt;H3&gt;Overview&lt;/H3&gt;
&lt;P&gt;When you add a new visualization in your application, the very first thing you do, is bind it to the data. Microsoft Chart control allows many different ways of populating data in the chart and it is important to understand the differences between them and being able to choose the best approach. I put together all the possible data binding options and the scenarios when they should be used.&lt;/P&gt;
&lt;H3&gt;Data Sources&lt;/H3&gt;
&lt;P&gt;Before jumping into the binding methods I want to quickly list all the supportable data sources which can be used in chart binding methods. Keep in mind that not all methods accept all source types.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;SqlCommand&lt;/LI&gt;
&lt;LI&gt;OleDbCommand&lt;/LI&gt;
&lt;LI&gt;SqlDataAdapter&lt;/LI&gt;
&lt;LI&gt;OleDbDataAdapter&lt;/LI&gt;
&lt;LI&gt;DataView&lt;/LI&gt;
&lt;LI&gt;DataSet&lt;/LI&gt;
&lt;LI&gt;DataReader&lt;/LI&gt;
&lt;LI&gt;List&lt;/LI&gt;
&lt;LI&gt;Array&lt;/LI&gt;
&lt;LI&gt;IList&lt;/LI&gt;
&lt;LI&gt;IListSource&lt;/LI&gt;
&lt;LI&gt;IEnumerable&lt;/LI&gt;&lt;/UL&gt;
&lt;H3&gt;Data Point X and Y values&lt;/H3&gt;
&lt;P&gt;When you bind chart you create series and series data points. Each data point in the series should have it's Y value set and in addition to the Y value you can also bind or set other data point properties:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;X Value&lt;/STRONG&gt; - Defines location of the data point along X axis. If not specified, data point index in the series will be used. &lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Additional Y Values&lt;/STRONG&gt; - Chart types like Bubble or Stock require multiple Y values. You can also bind additional Y values in the regular chart types, if you want to use those values for labels or tooltips.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Category&lt;/STRONG&gt; - When you displaying categories on the X axis, they are stored in the AxisLabel property of the data point. All data binding methods will automatically detect the type of the data and you should not worry about it.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Other Properties&lt;/STRONG&gt; - Some of the binding methods allow you to set additional properties like data point labels, tooltips and others.&lt;/LI&gt;&lt;/UL&gt;
&lt;H3&gt;Binding Options Overview&lt;/H3&gt;
&lt;P&gt;This table lists data binding techniques, starting from the most basic methods proceeding to more advanced. &lt;/P&gt;
&lt;TABLE class="" cellSpacing=0 cellPadding=6 width=710 border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=169&gt;
&lt;P&gt;&lt;STRONG&gt;Chart.DataBindTable&lt;/STRONG&gt; &lt;BR&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=267&gt;
&lt;UL&gt;
&lt;LI&gt;Simple binding for X and Y values.&lt;/LI&gt;
&lt;LI&gt;Automatic series creation, based on the number of columns in the data source.&lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=271&gt;
&lt;UL&gt;
&lt;LI&gt;No multiple Y values per series.&lt;/LI&gt;
&lt;LI&gt;All series have same X value, or it is not set.&lt;/LI&gt;
&lt;LI&gt;No binding for extended chart properties like tooltips.&lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=170&gt;
&lt;P&gt;&lt;STRONG&gt;Chart.DataSource and Chart.DataBind&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=267&gt;
&lt;UL&gt;
&lt;LI&gt;Can be used at design-time.&lt;/LI&gt;
&lt;LI&gt;Supports multiple Y values.&lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=271&gt;
&lt;UL&gt;
&lt;LI&gt;No binding for extended chart properties like tooltips. &lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=171&gt;
&lt;P&gt;&lt;STRONG&gt;Points.DataBind(X)Y&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=267&gt;
&lt;UL&gt;
&lt;LI&gt;Supports multiple data sources, including separate data source for X and Y values.&lt;/LI&gt;
&lt;LI&gt;Supports multiple Y values.&lt;/LI&gt;
&lt;LI&gt;Provides more flexibility than methods above&lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=271&gt;
&lt;UL&gt;
&lt;LI&gt;No binding for extended chart properties like tooltips. &lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=172&gt;
&lt;P&gt;&lt;STRONG&gt;Points.DataBind&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=267&gt;
&lt;UL&gt;
&lt;LI&gt;Same as the above, plus:&lt;/LI&gt;
&lt;LI&gt;Supports binding for extended chart properties like tooltips.&lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=271&gt;
&lt;UL&gt;
&lt;LI&gt;Does not support different data sources for X and Y values of a series. &lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=173&gt;
&lt;P&gt;&lt;STRONG&gt;Chart.DataBindCrossTab&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=267&gt;
&lt;UL&gt;
&lt;LI&gt;Automatically creates series for each unique value in specified column used to group the data.&lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=271&gt;
&lt;UL&gt;
&lt;LI&gt;Only single level grouping is supported. &lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;H3&gt;Binding Options Details&lt;/H3&gt;
&lt;BLOCKQUOTE&gt;
&lt;H4&gt;Chart.DataBindTable method&lt;/H4&gt;
&lt;P&gt;The Chart.DataBindTable method is the simplest way to bind chart to a table with several columns. New series will be automatically created for each of the columns and you can optionally use one column for the X value for all series.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Example&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Imagine you have a data source containing these columns: Prod A, Prod B, Prod C, Prod D, Prod E, Other and SalesName, you can easily create chart below with a single line of code:&lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: #7f9db9 1px solid; BORDER-TOP: #7f9db9 1px solid; FONT-SIZE: 11px; OVERFLOW: auto; BORDER-LEFT: #7f9db9 1px solid; WIDTH: 427px; LINE-HEIGHT: 100%! important; BORDER-BOTTOM: #7f9db9 1px solid; FONT-FAMILY: courier new; HEIGHT: 45px; BACKGROUND-COLOR: white"&gt;
&lt;TABLE class="" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; MARGIN: 2px 0px; WIDTH: 99%; BORDER-BOTTOM: #eee 0px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #fff; BORDER-RIGHT-WIDTH: 0px" cellSpacing=0 cellPadding=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="PADDING-LEFT: 10px; FONT-SIZE: 11px; BORDER-BOTTOM: #f7f7f7 1px solid; FONT-FAMILY: courier new; WHITE-SPACE: nowrap"&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;Chart1.DataBindTable(myReader, &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"SalesName"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;); &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;BR&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/DataBindingMSChartcontrol_10712/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/DataBindingMSChartcontrol_10712/image_2.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=300 alt=image src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/DataBindingMSChartcontrol_10712/image_thumb.png" width=400 border=0 mce_src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/DataBindingMSChartcontrol_10712/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;H4&gt;&amp;nbsp;&lt;/H4&gt;
&lt;H4&gt;Chart.DataSource property&lt;/H4&gt;
&lt;P&gt;Chart &lt;STRONG&gt;DataSource&lt;/STRONG&gt; property is the only way to bind chart at design-time. In addition to specifying the DataSource property you also need to create series and set their &lt;STRONG&gt;YValueMembers&lt;/STRONG&gt; and optionally &lt;STRONG&gt;XValueMember&lt;/STRONG&gt; properties. Multiple Y values can be bound if you specify comma separated list of members in the YValueMembers property.&lt;/P&gt;
&lt;P&gt;Chart will automatically bind itself to specified data source and members just before rendering. You can force chart to bind at any moment by calling &lt;STRONG&gt;Chart.DataBind() &lt;/STRONG&gt;method.&lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: #7f9db9 1px solid; BORDER-TOP: #7f9db9 1px solid; FONT-SIZE: 11px; OVERFLOW: auto; BORDER-LEFT: #7f9db9 1px solid; WIDTH: 450px; LINE-HEIGHT: 100%! important; BORDER-BOTTOM: #7f9db9 1px solid; FONT-FAMILY: courier new; HEIGHT: 150px; BACKGROUND-COLOR: white"&gt;
&lt;TABLE class="" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; MARGIN: 2px 0px; WIDTH: 99%; BORDER-BOTTOM: #eee 0px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #fff; BORDER-RIGHT-WIDTH: 0px" cellSpacing=0 cellPadding=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="PADDING-LEFT: 10px; FONT-SIZE: 11px; BORDER-BOTTOM: #f7f7f7 1px solid; FONT-FAMILY: courier new; WHITE-SPACE: nowrap"&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Set chart data source &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;chart1.DataSource = myCommand; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;SPAN style="COLOR: green"&gt;// Set series members names for the X and Y values &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;chart1.Series[&lt;SPAN style="COLOR: blue"&gt;"Series 1"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;].XValueMember = &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;"Name"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;; &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;chart1.Series[&lt;SPAN style="COLOR: blue"&gt;"Series 1"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;].YValueMembers = &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;"Sales"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;; &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;SPAN style="COLOR: green"&gt;// Data bind to the selected data source &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;chart1.DataBind(); &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;
&lt;H4&gt;&amp;nbsp;&lt;/H4&gt;
&lt;H4&gt;DataBindCrossTab&lt;/H4&gt;
&lt;P&gt;The Chart.DataBindCrossTab is different compared to all other binding methods, in that it allows for the &lt;A&gt;grouping&lt;/A&gt; of unique values in a column. Each unique value in the specified grouped column results in the creation of a data series. In addition, extended data point properties other than X and Y values can be bound.&lt;/P&gt;
&lt;P&gt;These other properties are bound using the &lt;EM&gt;otherFields&lt;/EM&gt; parameter using this syntax:&lt;/P&gt;&lt;PRE&gt;PointProperty=Field[{Format}] [,PointProperty= Field[{Format}]].&lt;/PRE&gt;
&lt;P&gt;A list of these properties are as follows: &lt;STRONG&gt;AxisLabel&lt;/STRONG&gt;, &lt;STRONG&gt;Tooltip&lt;/STRONG&gt;, &lt;STRONG&gt;Label&lt;/STRONG&gt;,&amp;nbsp; &lt;STRONG&gt;LegendText&lt;/STRONG&gt;,&amp;nbsp; &lt;STRONG&gt;LegendTooltip&lt;/STRONG&gt; and &lt;STRONG&gt;CustomPropertyName&lt;/STRONG&gt; (the name of a custom property). For more information on possible formats see the &lt;STRONG&gt;Formatting Types&lt;/STRONG&gt; topic in the MSDN library.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Example&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;In the sample below we have a table that has the sales and commissions of sales people for three years. We group by the "Name" column, thereby creating one data series per sales person. The X values are bound to the "Year" column, the Y values are bound to the "Sales" column, the Label property of the resulting data points (one per record) is bound to the "Commissions" column, and the LegendText property is bound to the "Name" column.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/DataBindingMSChartcontrol_10712/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/DataBindingMSChartcontrol_10712/image_4.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=181 alt=image src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/DataBindingMSChartcontrol_10712/image_thumb_1.png" width=408 border=0 mce_src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/DataBindingMSChartcontrol_10712/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/DataBindingMSChartcontrol_10712/image_6.png" mce_href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/DataBindingMSChartcontrol_10712/image_6.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=300 alt=image src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/DataBindingMSChartcontrol_10712/image_thumb_2.png" width=400 border=0 mce_src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/DataBindingMSChartcontrol_10712/image_thumb_2.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: #7f9db9 1px solid; BORDER-TOP: #7f9db9 1px solid; FONT-SIZE: 11px; OVERFLOW: auto; BORDER-LEFT: #7f9db9 1px solid; WIDTH: 621px; LINE-HEIGHT: 100%! important; BORDER-BOTTOM: #7f9db9 1px solid; FONT-FAMILY: courier new; HEIGHT: 78px; BACKGROUND-COLOR: white"&gt;
&lt;TABLE class="" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; MARGIN: 2px 0px; WIDTH: 99%; BORDER-BOTTOM: #eee 0px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #fff; BORDER-RIGHT-WIDTH: 0px" cellSpacing=0 cellPadding=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="PADDING-LEFT: 10px; FONT-SIZE: 11px; BORDER-BOTTOM: #f7f7f7 1px solid; FONT-FAMILY: courier new; WHITE-SPACE: nowrap"&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Group by "Name" column, bind X values to "Year", Y values to "Sales", &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;SPAN style="COLOR: green"&gt;// and Label property to "Commissions. &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;chart1.DataBindCrossTab(myReader, "Name&lt;SPAN style="COLOR: blue"&gt;", "&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;", "&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;Sales&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;", "&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;Label=Commissions"); &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;
&lt;H4&gt;&amp;nbsp;&lt;/H4&gt;
&lt;H4&gt;Points.DataBind&lt;/H4&gt;
&lt;P&gt;This method allows for data point properties other than X and Y values to be bound to data columns. For example, you want to set data point label to a value in one of the data source columns. These other properties are bound using the &lt;EM&gt;otherFields&lt;/EM&gt; parameter using this syntax:&lt;/P&gt;&lt;PRE&gt;PointProperty=FieldName[{Format}][,PointProperty= FieldName[{Format}]]&lt;/PRE&gt;
&lt;P&gt;A list of these properties includes: &lt;STRONG&gt;AxisLabel&lt;/STRONG&gt;, &lt;STRONG&gt;Tooltip&lt;/STRONG&gt;, &lt;STRONG&gt;Label&lt;/STRONG&gt;,&amp;nbsp; &lt;STRONG&gt;LegendText&lt;/STRONG&gt;,&amp;nbsp; &lt;STRONG&gt;LegendTooltip&lt;/STRONG&gt; and &lt;STRONG&gt;CustomPropertyName&lt;/STRONG&gt; (the name of a custom property).&lt;/P&gt;
&lt;P&gt;This method does not allow you to specify separate data sources for the X and Y values of a series (for this functionality use the &lt;STRONG&gt;DataBind(X)Y&lt;/STRONG&gt; methods described in the section above). &lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Example&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Code below demonstrates how to bind X and Y values of the series to columns "Name" and "Sales" respectively. The &lt;STRONG&gt;Label&lt;/STRONG&gt; and &lt;STRONG&gt;Tooltip&lt;/STRONG&gt; properties of the resulting data points are also bound to the "Commissions" and "Year" column. &lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: #7f9db9 1px solid; BORDER-TOP: #7f9db9 1px solid; FONT-SIZE: 11px; OVERFLOW: auto; BORDER-LEFT: #7f9db9 1px solid; WIDTH: 527px; LINE-HEIGHT: 100%! important; BORDER-BOTTOM: #7f9db9 1px solid; FONT-FAMILY: courier new; HEIGHT: 71px; BACKGROUND-COLOR: white"&gt;
&lt;TABLE class="" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; MARGIN: 2px 0px; WIDTH: 99%; BORDER-BOTTOM: #eee 0px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #fff; BORDER-RIGHT-WIDTH: 0px" cellSpacing=0 cellPadding=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="PADDING-LEFT: 10px; FONT-SIZE: 11px; BORDER-BOTTOM: #f7f7f7 1px solid; FONT-FAMILY: courier new; WHITE-SPACE: nowrap"&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;Chart1.Series[&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;"Series1"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;].Points.DataBind( &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;myReader, &lt;SPAN style="COLOR: blue"&gt;"Name"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;, &lt;SPAN style="COLOR: blue"&gt;"Sales"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;"Tooltip=Year, Label=Commissions{C2}"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;); &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;
&lt;H4&gt;&amp;nbsp;&lt;/H4&gt;
&lt;H4&gt;Points.DataBind[X]Y&lt;/H4&gt;
&lt;P&gt;The DataBindXY method allows for the binding of X and Y values of a series, while DataBindY binds Y values only. When binding X and Y values using &lt;STRONG&gt;DataBindXY&lt;/STRONG&gt; the same or different data sources may be used.&lt;/P&gt;
&lt;P&gt;Some data sources support multiple values (e.g. data sources that have columns of data). For example, &lt;STRONG&gt;OleDbDataReader&lt;/STRONG&gt; may have access to more than one column of data. If the column to be used is not specified, then the first available column will be used. To use a column other than the first one just specify the column name in the method call.&lt;/P&gt;
&lt;P&gt;Note that when specifying the column names to be bound to the Y values a comma can be embedded as part of a column name by specifying a double comma.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Example&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Code below demonstrates how to bind series points to the array of doubles.&lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: #7f9db9 1px solid; BORDER-TOP: #7f9db9 1px solid; FONT-SIZE: 11px; OVERFLOW: auto; BORDER-LEFT: #7f9db9 1px solid; WIDTH: 545px; LINE-HEIGHT: 100%! important; BORDER-BOTTOM: #7f9db9 1px solid; FONT-FAMILY: courier new; HEIGHT: 108px; BACKGROUND-COLOR: white"&gt;
&lt;TABLE class="" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; MARGIN: 2px 0px; WIDTH: 99%; BORDER-BOTTOM: #eee 0px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #fff; BORDER-RIGHT-WIDTH: 0px" cellSpacing=0 cellPadding=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="PADDING-LEFT: 10px; FONT-SIZE: 11px; BORDER-BOTTOM: #f7f7f7 1px solid; FONT-FAMILY: courier new; WHITE-SPACE: nowrap"&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Initialize an array of doubles. &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;SPAN style="COLOR: blue"&gt;double&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt; [] array = { 2.8, 4.4, 6.5, 8.3, 3.6, 5.6, 7.3, 9.2, 1.0}; &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;SPAN style="COLOR: green"&gt;// Bind the double array to the Y axis points of the data series. &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;Chart1.Series[&lt;SPAN style="COLOR: blue"&gt;"Series1"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;].Points.DataBindY(array); &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;H4&gt;'Manual' series population&lt;/H4&gt;
&lt;P&gt;In case you need to perform some custom actions while binding and none of the above methods works, you can always 'manually' bind chart by iterating through the data source and add data points to the series as needed. This approach is also very useful when series data is calculated using some formula.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Example&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: #7f9db9 1px solid; BORDER-TOP: #7f9db9 1px solid; FONT-SIZE: 11px; OVERFLOW: auto; BORDER-LEFT: #7f9db9 1px solid; WIDTH: 699px; LINE-HEIGHT: 100%! important; BORDER-BOTTOM: #7f9db9 1px solid; FONT-FAMILY: courier new; HEIGHT: 727px; BACKGROUND-COLOR: white"&gt;
&lt;TABLE class="" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; MARGIN: 2px 0px; WIDTH: 99%; BORDER-BOTTOM: #eee 0px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #fff; BORDER-RIGHT-WIDTH: 0px" cellSpacing=0 cellPadding=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="PADDING-LEFT: 10px; FONT-SIZE: 11px; BORDER-BOTTOM: #f7f7f7 1px solid; FONT-FAMILY: courier new; WHITE-SPACE: nowrap"&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Resolve the address to the Access database &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt; fileNameString = &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;.MapPath(&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;"."&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;); &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;fileNameString += &lt;SPAN style="COLOR: blue"&gt;"..\\..\\..\\data\\chartdata.mdb"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;; &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;SPAN style="COLOR: green"&gt;// Initialize a connection string &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt; myConnectionString = &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;"PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source="&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt; + fileNameString; &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;SPAN style="COLOR: green"&gt;// Define the database query &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt; mySelectQuery=&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;"SELECT * FROM SALESCOUNTS;"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;; &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;SPAN style="COLOR: green"&gt;// Create a database connection object using the connection string &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;OleDbConnection myConnection = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt; OleDbConnection(myConnectionString); &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;SPAN style="COLOR: green"&gt;// Create a database command on the connection using query &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;OleDbCommand myCommand = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt; OleDbCommand(mySelectQuery, myConnection); &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;SPAN style="COLOR: green"&gt;// Open the connection &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;myCommand.Connection.Open(); &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;SPAN style="COLOR: green"&gt;// Initializes a new instance of the OleDbDataAdapter class &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;OleDbDataAdapter myDataAdapter = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt; OleDbDataAdapter(); &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;myDataAdapter.SelectCommand = myCommand; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;SPAN style="COLOR: green"&gt;// Initializes a new instance of the DataSet class &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;DataSet myDataSet = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt; DataSet(); &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;SPAN style="COLOR: green"&gt;// Adds rows in the DataSet &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;myDataAdapter.Fill(myDataSet, &lt;SPAN style="COLOR: blue"&gt;"Query"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;); &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;SPAN style="COLOR: blue"&gt;foreach&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;(DataRow row &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;in&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt; myDataSet.Tables[&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;"Query"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;].Rows) &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;{ &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;SPAN style="COLOR: green"&gt;&amp;nbsp;&amp;nbsp; // For each Row add a new series &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp; string&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt; seriesName = row[&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;"SalesRep"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;].ToString(); &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&amp;nbsp; Chart1.Series.Add(seriesName); &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&amp;nbsp; Chart1.Series[seriesName].ChartType = SeriesChartType.Line; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&amp;nbsp; Chart1.Series[seriesName].BorderWidth = 2; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp; for&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;(&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt; colIndex = 1; colIndex &amp;lt; myDataSet.Tables[&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;"Query"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;].Columns.Count; colIndex++) &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&amp;nbsp; { &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;SPAN style="COLOR: green"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // For each column (column 1 and onward) add the value as a point &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt; columnName = myDataSet.Tables[&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;"Query"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;].Columns[colIndex].ColumnName; &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt; YVal = (&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;) row[columnName]; &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chart1.Series[seriesName].Points.AddXY(columnName, YVal); &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&amp;nbsp; } &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;} &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;DataGrid.DataSource = myDataSet; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;DataGrid.DataBind(); &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;SPAN style="COLOR: green"&gt;// Closes the connection to the data source. This is the preferred &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;SPAN style="COLOR: green"&gt;// method of closing any open connection. &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11px"&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;myCommand.Connection.Close(); &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;H3&gt;Other useful things to know&lt;/H3&gt;
&lt;P&gt;Here are couple things that you should know about when binding chart:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Empty Points&lt;/STRONG&gt; - Understand what empty points are and how you can use them. Right now the best source of the information is Chart Sample Environment but I will blog about it later.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;AlignDataPointsByAxisLabel&lt;/STRONG&gt; - If you are using a stacked chart type with categorical X axis this helper method can be very useful. Find more information in the documentation and Chart Sample Environment.&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9436859" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alexgor/archive/tags/Chart/default.aspx">Chart</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/Windows+Forms/default.aspx">Windows Forms</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/Microsoft+Chart+Control/default.aspx">Microsoft Chart Control</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/Data+Binding/default.aspx">Data Binding</category></item><item><title>ASP.NET Connections 2009</title><link>http://blogs.msdn.com/alexgor/archive/2009/02/20/asp-net-connections-2009.aspx</link><pubDate>Fri, 20 Feb 2009 09:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9435558</guid><dc:creator>alexgor</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/alexgor/comments/9435558.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alexgor/commentrss.aspx?PostID=9435558</wfw:commentRss><description>&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/ASP.NETConnections2009_140CE/image_6.png" mce_href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/ASP.NETConnections2009_140CE/image_6.png"&gt;&lt;IMG title=image style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; DISPLAY: inline; MARGIN: 0px 20px 5px 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=87 alt=image src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/ASP.NETConnections2009_140CE/image_thumb_2.png" width=176 align=left border=0 mce_src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/ASP.NETConnections2009_140CE/image_thumb_2.png"&gt;&lt;/A&gt;Have a question about the ASP.NET chart control? Want to meet and discuss the future visualization roadmap? I will be at the ASP.NET Connections March 22-25. See you there!&lt;/P&gt;
&lt;P&gt;&lt;A title=http://www.devconnections.com/ href="http://www.devconnections.com/" mce_href="http://www.devconnections.com/"&gt;http://www.devconnections.com/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Alex.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9435558" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alexgor/archive/tags/Chart/default.aspx">Chart</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/DevConnections/default.aspx">DevConnections</category></item><item><title>Using Chart HTTP Handler</title><link>http://blogs.msdn.com/alexgor/archive/2009/01/12/using-chart-http-handler.aspx</link><pubDate>Mon, 12 Jan 2009 22:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9309559</guid><dc:creator>alexgor</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/alexgor/comments/9309559.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alexgor/commentrss.aspx?PostID=9309559</wfw:commentRss><description>&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/UsingChartHTTPHandler_A7C9/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/UsingChartHTTPHandler_A7C9/image_4.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; MARGIN: 10px 20px 10px 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=78 alt=image src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/UsingChartHTTPHandler_A7C9/image_thumb_1.png" width=239 align=left border=0 mce_src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/UsingChartHTTPHandler_A7C9/image_thumb_1.png"&gt;&lt;/A&gt; Delian Tchoparinov just posted on his &lt;A href="http://blogs.msdn.com/deliant" target=_blank mce_href="http://blogs.msdn.com/deliant"&gt;blog&lt;/A&gt; about chart image rendering using Chart HTTP Handlers. This is very useful reading for everybody using the ASP.NET version of the Microsoft Chart control. You can find this post &lt;A href="http://blogs.msdn.com/deliant/archive/2008/12/02/managing-chart-generated-images-with-chart-image-handler.aspx" target=_blank mce_href="http://blogs.msdn.com/deliant/archive/2008/12/02/managing-chart-generated-images-with-chart-image-handler.aspx"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Alex.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9309559" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alexgor/archive/tags/Chart/default.aspx">Chart</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/Microsoft+Chart+Control/default.aspx">Microsoft Chart Control</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/HTTP+Handler/default.aspx">HTTP Handler</category></item><item><title>Combining ASP.NET MVC and ASP.NET Charting Controls</title><link>http://blogs.msdn.com/alexgor/archive/2008/11/26/combining-asp-net-mvc-and-asp-net-charting-controls.aspx</link><pubDate>Thu, 27 Nov 2008 00:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9145332</guid><dc:creator>alexgor</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/alexgor/comments/9145332.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alexgor/commentrss.aspx?PostID=9145332</wfw:commentRss><description>&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/CombiningASP.NETMVCa.NETChartingControls_C2B9/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/CombiningASP.NETMVCa.NETChartingControls_C2B9/image_2.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; MARGIN: 0px 20px 10px 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=107 alt=image src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/CombiningASP.NETMVCa.NETChartingControls_C2B9/image_thumb.png" width=144 align=left border=0 mce_src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/CombiningASP.NETMVCa.NETChartingControls_C2B9/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;Melvin Harbour recently posted in &lt;A href="http://weblogs.asp.net/melvynharbour/archive/2008/11/25/combining-asp-net-mvc-and-asp-net-charting-controls.aspx" mce_href="http://weblogs.asp.net/melvynharbour/archive/2008/11/25/combining-asp-net-mvc-and-asp-net-charting-controls.aspx"&gt;his blog&lt;/A&gt; about using ASP.NET Chart control with ASP.NET MVC.&lt;/P&gt;
&lt;P&gt;Alex&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9145332" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alexgor/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/Microsoft+Chart+Control/default.aspx">Microsoft Chart Control</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/ASP.NET+MVC/default.aspx">ASP.NET MVC</category></item><item><title>Microsoft Chart Control How-to: Add Rich Content Using Keywords</title><link>http://blogs.msdn.com/alexgor/archive/2008/11/11/microsoft-chart-control-how-to-using-keywords.aspx</link><pubDate>Tue, 11 Nov 2008 21:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9060627</guid><dc:creator>alexgor</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.msdn.com/alexgor/comments/9060627.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alexgor/commentrss.aspx?PostID=9060627</wfw:commentRss><description>&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/MicrosoftChartControlHowtoRichContentUsi_EDFF/image_6.png" mce_href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/MicrosoftChartControlHowtoRichContentUsi_EDFF/image_6.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN: 0px 20px 10px; BORDER-RIGHT-WIDTH: 0px" height=108 alt=image src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/MicrosoftChartControlHowtoRichContentUsi_EDFF/image_thumb_2.png" width=173 align=left border=0 mce_src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/MicrosoftChartControlHowtoRichContentUsi_EDFF/image_thumb_2.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Adding Labels or Tooltips is a simple task in the chart, but what if we want to show more data than just a simple data point value? &lt;EM&gt;Keywords&lt;/EM&gt; allows specifying rich content for many text based properties, so that you can build a tooltip as shown in this &lt;STRONG&gt;Bubble&lt;/STRONG&gt; chart image.&lt;/P&gt;
&lt;P&gt;A &lt;EM&gt;Keyword&lt;/EM&gt; is a specially formatted character sequence which can be used in many chart string properties to provide rich content. During the rendering of the chart, each &lt;EM&gt;Keyword&lt;/EM&gt; is replaced with a value from the chart series or data point. For example, &lt;EM&gt;Keywords&lt;/EM&gt; may be used to display several series values in the chart data point labels or tooltips. The sample below will display series data point Y value using the currency format string in the tooltip.&lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: #7f9db9 1px solid; BORDER-TOP: #7f9db9 1px solid; FONT-SIZE: 11px; OVERFLOW: auto; BORDER-LEFT: #7f9db9 1px solid; LINE-HEIGHT: 100%! important; BORDER-BOTTOM: #7f9db9 1px solid; FONT-FAMILY: courier new; BACKGROUND-COLOR: white"&gt;
&lt;TABLE class="" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; MARGIN: 2px 0px; WIDTH: 99%; BORDER-BOTTOM: #eee 0px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #fff; BORDER-RIGHT-WIDTH: 0px" cellSpacing=0 cellPadding=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="PADDING-LEFT: 10px; FONT-SIZE: 11px; BORDER-BOTTOM: #f7f7f7 1px solid; FONT-FAMILY: courier new; WHITE-SPACE: nowrap"&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;chart.Series[0].Tooltip = “Data Point Y Value: #VALY{C0}” &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;
&lt;P&gt;As you may notice, to specify a tooltip on all chart data points we only need to set a single property of the series. You can use multiple keywords in one string and also specify optional formatting string. &lt;/P&gt;
&lt;H4&gt;Use cases&lt;/H4&gt;
&lt;P&gt;1) I want series data points to display a label with category name and price. Label example: "Bike -&amp;gt; $2.00"&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV style="BORDER-RIGHT: #7f9db9 1px solid; BORDER-TOP: #7f9db9 1px solid; FONT-SIZE: 11px; OVERFLOW: auto; BORDER-LEFT: #7f9db9 1px solid; LINE-HEIGHT: 100%! important; BORDER-BOTTOM: #7f9db9 1px solid; FONT-FAMILY: courier new; BACKGROUND-COLOR: white"&gt;
&lt;TABLE class="" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; MARGIN: 2px 0px; WIDTH: 99%; BORDER-BOTTOM: #eee 0px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #fff; BORDER-RIGHT-WIDTH: 0px" cellSpacing=0 cellPadding=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="PADDING-LEFT: 10px; FONT-SIZE: 11px; BORDER-BOTTOM: #f7f7f7 1px solid; FONT-FAMILY: courier new; WHITE-SPACE: nowrap"&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;series.Label = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"#AXISLABEL -&amp;gt; #VALY{C}"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;2) I'm using a Bubble chart with 2 Y values presenting model price and popularity index and I want to show this to values in my data points tooltip. Here is tooltip example: &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;"Model:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XR300 &lt;BR&gt;Popularity Index: 4.5" &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV style="BORDER-RIGHT: #7f9db9 1px solid; BORDER-TOP: #7f9db9 1px solid; FONT-SIZE: 11px; OVERFLOW: auto; BORDER-LEFT: #7f9db9 1px solid; LINE-HEIGHT: 100%! important; BORDER-BOTTOM: #7f9db9 1px solid; FONT-FAMILY: courier new; BACKGROUND-COLOR: white"&gt;
&lt;TABLE class="" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; MARGIN: 2px 0px; WIDTH: 99%; BORDER-BOTTOM: #eee 0px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #fff; BORDER-RIGHT-WIDTH: 0px" cellSpacing=0 cellPadding=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="PADDING-LEFT: 10px; FONT-SIZE: 11px; BORDER-BOTTOM: #f7f7f7 1px solid; FONT-FAMILY: courier new; WHITE-SPACE: nowrap"&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;series.ToolTip = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"Model: \t#AXISLABEL\nPopularity Index: \t#VALY"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;3) I want to enable a postback and get an index of the data point the customer clicked on, so I can perform a drill-down action.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV style="BORDER-RIGHT: #7f9db9 1px solid; BORDER-TOP: #7f9db9 1px solid; FONT-SIZE: 11px; OVERFLOW: auto; BORDER-LEFT: #7f9db9 1px solid; LINE-HEIGHT: 100%! important; BORDER-BOTTOM: #7f9db9 1px solid; FONT-FAMILY: courier new; BACKGROUND-COLOR: white"&gt;
&lt;TABLE class="" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; MARGIN: 2px 0px; WIDTH: 99%; BORDER-BOTTOM: #eee 0px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #fff; BORDER-RIGHT-WIDTH: 0px" cellSpacing=0 cellPadding=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="PADDING-LEFT: 10px; FONT-SIZE: 11px; BORDER-BOTTOM: #f7f7f7 1px solid; FONT-FAMILY: courier new; WHITE-SPACE: nowrap"&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;series.PostBack = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"#INDEX"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;4) I want to add additional columns in the legend to show average, minimum and total of my series as shown in the chart below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;A href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/MicrosoftChartControlHowtoRichContentUsi_EDFF/image_3.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=295 alt=image src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/MicrosoftChartControlHowtoRichContentUsi_EDFF/image_thumb.png" width=411 border=0&gt;&lt;/A&gt; &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV style="BORDER-RIGHT: #7f9db9 1px solid; BORDER-TOP: #7f9db9 1px solid; FONT-SIZE: 11px; OVERFLOW: auto; BORDER-LEFT: #7f9db9 1px solid; WIDTH: 539px; LINE-HEIGHT: 100%! important; BORDER-BOTTOM: #7f9db9 1px solid; FONT-FAMILY: courier new; HEIGHT: 497px; BACKGROUND-COLOR: white"&gt;
&lt;TABLE class="" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; MARGIN: 2px 0px; WIDTH: 99%; BORDER-BOTTOM: #eee 0px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #fff; BORDER-RIGHT-WIDTH: 0px" cellSpacing=0 cellPadding=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="PADDING-LEFT: 10px; FONT-SIZE: 11px; BORDER-BOTTOM: #f7f7f7 1px solid; FONT-FAMILY: courier new; WHITE-SPACE: nowrap"&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;&lt;/FONT&gt;&lt;FONT style="COLOR: green"&gt;// Add header separator of type line&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;Chart1.Legends[&lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"Default"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;].HeaderSeparator = LegendSeparatorStyle.Line;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;Chart1.Legends[&lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"Default"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;].HeaderSeparatorColor = Color.Gray;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;/FONT&gt;&lt;FONT style="COLOR: green"&gt;// Add Color column&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;LegendCellColumn firstColumn = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;new&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt; LegendCellColumn();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;firstColumn.ColumnType = LegendCellColumnType.SeriesSymbol;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;firstColumn.HeaderText = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"Color"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;firstColumn.HeaderBackColor = Color.WhiteSmoke;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;Chart1.Legends[&lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"Default"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;].CellColumns.Add(firstColumn);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;/FONT&gt;&lt;FONT style="COLOR: green"&gt;// Add Legend Text column&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;LegendCellColumn secondColumn = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;new&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt; LegendCellColumn();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;secondColumn.ColumnType = LegendCellColumnType.Text;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;secondColumn.HeaderText = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"Name"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;secondColumn.Text = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"#LEGENDTEXT"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;secondColumn.HeaderBackColor = Color.WhiteSmoke;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;Chart1.Legends[&lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"Default"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;].CellColumns.Add(secondColumn);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;/FONT&gt;&lt;FONT style="COLOR: green"&gt;// Add AVG cell column&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;LegendCellColumn avgColumn = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;new&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt; LegendCellColumn();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;avgColumn.Text = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"#AVG{N2}"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;avgColumn.HeaderText = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"Avg"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;avgColumn.Name = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"AvgColumn"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;avgColumn.HeaderBackColor = Color.WhiteSmoke;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;Chart1.Legends[&lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"Default"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;].CellColumns.Add(avgColumn);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;/FONT&gt;&lt;FONT style="COLOR: green"&gt;// Add Total cell column&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;LegendCellColumn totalColumn = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;new&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt; LegendCellColumn();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;totalColumn.Text = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"#TOTAL{N1}"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;totalColumn.HeaderText = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"Total"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;totalColumn.Name = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"TotalColumn"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;totalColumn.HeaderBackColor = Color.WhiteSmoke;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;Chart1.Legends[&lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"Default"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;].CellColumns.Add(totalColumn);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&lt;/FONT&gt;&lt;FONT style="COLOR: green"&gt;// Set Min cell column attributes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;LegendCellColumn minColumn = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;new&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt; LegendCellColumn();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;minColumn.Text = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"#MIN{N1}"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;minColumn.HeaderText = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"Min"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;minColumn.Name = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"MinColumn"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;minColumn.HeaderBackColor = Color.WhiteSmoke;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;Chart1.Legends[&lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"Default"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;].CellColumns.Add(minColumn);&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;
&lt;H4&gt;Supported Keyword List&lt;/H4&gt;
&lt;P&gt;Here is the list of supported keywords. Chart control support multiple Y values and all related keywords use the first one by default but also can be used with additional Y values. For example: &lt;/P&gt;
&lt;P&gt;“High=#VALY/nLow=#VALY2/nOpen=#VALY3/nClose=#VALY4”&lt;/P&gt;
&lt;P&gt;An optional format string can be added at the end of each keyword.&amp;nbsp; You can find more about possible format strings from here: &lt;A title=http://msdn.microsoft.com/en-us/library/427bttx3.aspx href="http://msdn.microsoft.com/en-us/library/427bttx3.aspx" mce_href="http://msdn.microsoft.com/en-us/library/427bttx3.aspx"&gt;http://msdn.microsoft.com/en-us/library/427bttx3.aspx&lt;/A&gt; Below is an example of using standard currency format and custom format string:&lt;/P&gt;
&lt;P&gt;“Price= #VALY2{C0}/nAverage Price = #AVGY2{C0}/nVolume = #VALY3{#,,.;(#,,.);0}”&lt;/P&gt;
&lt;TABLE class="" cellSpacing=0 cellPadding=2 width=661 border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="" width=171&gt;&lt;STRONG&gt;Keyword&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD class="" width=295&gt;&lt;STRONG&gt;Replaced By&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD class="" width=105&gt;&lt;STRONG&gt;Supports Multiple Y Values&lt;/STRONG&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="" width=88&gt;&lt;STRONG&gt;Supports Formatting String&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=171&gt;#VALX&lt;/TD&gt;
&lt;TD class="" vAlign=top width=295&gt;X value of the data point.&lt;/TD&gt;
&lt;TD class="" vAlign=top width=105&gt;No&lt;/TD&gt;
&lt;TD class="" width=88&gt;Yes&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=171&gt;#VALY&lt;/TD&gt;
&lt;TD class="" vAlign=top width=295&gt;Y value of the data point&lt;/TD&gt;
&lt;TD class="" vAlign=top width=105&gt;Yes&lt;/TD&gt;
&lt;TD class="" width=88&gt;Yes&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=171&gt;#SERIESNAME&lt;/TD&gt;
&lt;TD class="" vAlign=top width=295&gt;Series name&lt;/TD&gt;
&lt;TD class="" vAlign=top width=105&gt;No&lt;/TD&gt;
&lt;TD class="" width=88&gt;No&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=171&gt;#LABEL&lt;/TD&gt;
&lt;TD class="" vAlign=top width=295&gt;Data point label&lt;/TD&gt;
&lt;TD class="" vAlign=top width=105&gt;No&lt;/TD&gt;
&lt;TD class="" width=88&gt;No&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=171&gt;#AXISLABEL&lt;/TD&gt;
&lt;TD class="" vAlign=top width=295&gt;Data point axis label&lt;/TD&gt;
&lt;TD class="" vAlign=top width=105&gt;No&lt;/TD&gt;
&lt;TD class="" width=88&gt;No&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=171&gt;#INDEX&lt;/TD&gt;
&lt;TD class="" vAlign=top width=295&gt;Data point index in the series&lt;/TD&gt;
&lt;TD class="" vAlign=top width=105&gt;No&lt;/TD&gt;
&lt;TD class="" width=88&gt;Yes&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=171&gt;#PERCENT&lt;/TD&gt;
&lt;TD class="" vAlign=top width=295&gt;Percent of the data point Y value&lt;/TD&gt;
&lt;TD class="" vAlign=top width=105&gt;Yes&lt;/TD&gt;
&lt;TD class="" width=88&gt;Yes&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=171&gt;#LEGENDTEXT&lt;/TD&gt;
&lt;TD class="" vAlign=top width=295&gt;Series or data point legend text&lt;/TD&gt;
&lt;TD class="" vAlign=top width=105&gt;No&lt;/TD&gt;
&lt;TD class="" width=88&gt;No&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=171&gt;#CUSTOMPROPERTY(XXX)&lt;/TD&gt;
&lt;TD class="" vAlign=top width=295&gt;Series or data point XXX custom property value, where XXX is the name of the custom property.&lt;/TD&gt;
&lt;TD class="" vAlign=top width=105&gt;No&lt;/TD&gt;
&lt;TD class="" width=88&gt;No&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=171&gt;#TOTAL&lt;/TD&gt;
&lt;TD class="" vAlign=top width=295&gt;Total of all Y values in the series&lt;/TD&gt;
&lt;TD class="" vAlign=top width=105&gt;Yes&lt;/TD&gt;
&lt;TD class="" width=88&gt;Yes&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=171&gt;#AVG&lt;/TD&gt;
&lt;TD class="" vAlign=top width=295&gt;Average of all Y values in the series&lt;/TD&gt;
&lt;TD class="" vAlign=top width=105&gt;Yes&lt;/TD&gt;
&lt;TD class="" width=88&gt;Yes&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=171&gt;#MIN&lt;/TD&gt;
&lt;TD class="" vAlign=top width=295&gt;Minimum of all Y values in the series&lt;/TD&gt;
&lt;TD class="" vAlign=top width=105&gt;Yes&lt;/TD&gt;
&lt;TD class="" width=88&gt;Yes&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=171&gt;#MAX&lt;/TD&gt;
&lt;TD class="" vAlign=top width=295&gt;Maximum of all Y values in the series&lt;/TD&gt;
&lt;TD class="" vAlign=top width=105&gt;Yes&lt;/TD&gt;
&lt;TD class="" width=88&gt;Yes&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=171&gt;#FIRST&lt;/TD&gt;
&lt;TD class="" vAlign=top width=295&gt;Y value of the first point in the series&lt;/TD&gt;
&lt;TD class="" vAlign=top width=105&gt;Yes&lt;/TD&gt;
&lt;TD class="" width=88&gt;Yes&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=171&gt;#LAST&lt;/TD&gt;
&lt;TD class="" vAlign=top width=296&gt;Y value of the last point in the series&lt;/TD&gt;
&lt;TD class="" vAlign=top width=105&gt;Yes&lt;/TD&gt;
&lt;TD class="" width=88&gt;Yes&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;H4&gt;Objects and Properties where keywords can be used&lt;/H4&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Series&lt;/EM&gt;&lt;/STRONG&gt; and &lt;STRONG&gt;&lt;EM&gt;DataPoint&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Label &lt;/LI&gt;
&lt;LI&gt;AxisLabel &lt;/LI&gt;
&lt;LI&gt;ToolTip &lt;/LI&gt;
&lt;LI&gt;Url &lt;/LI&gt;
&lt;LI&gt;MapAreaAttributes &lt;/LI&gt;
&lt;LI&gt;PostBackValue &lt;/LI&gt;
&lt;LI&gt;LegendToolTip &lt;/LI&gt;
&lt;LI&gt;LegendMapAreaAttributes &lt;/LI&gt;
&lt;LI&gt;LegendPostBackValue &lt;/LI&gt;
&lt;LI&gt;LegendUrl &lt;/LI&gt;
&lt;LI&gt;LegendText &lt;/LI&gt;
&lt;LI&gt;LabelToolTip &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Annotation&lt;/EM&gt;&lt;/STRONG&gt; (only if anchored to the data point using SetAnchor method)&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;ToolTip &lt;/LI&gt;
&lt;LI&gt;Url &lt;/LI&gt;
&lt;LI&gt;MapAreaAttributes &lt;/LI&gt;
&lt;LI&gt;PostBackValue &lt;/LI&gt;
&lt;LI&gt;Text (TextAnnotation)&lt;/LI&gt;&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;LegendCellColumn&lt;/EM&gt;&lt;/STRONG&gt; (only for legend items automatically created for series or data points): &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Text &lt;/LI&gt;
&lt;LI&gt;Tooltip &lt;/LI&gt;
&lt;LI&gt;Url &lt;/LI&gt;
&lt;LI&gt;MapAreaAttributes &lt;/LI&gt;
&lt;LI&gt;PostBackValue&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9060627" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alexgor/archive/tags/Chart/default.aspx">Chart</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/Windows+Forms/default.aspx">Windows Forms</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/Microsoft+Chart+Control/default.aspx">Microsoft Chart Control</category></item><item><title>Creating 'small' charts with Microsoft Chart Control</title><link>http://blogs.msdn.com/alexgor/archive/2008/11/05/creating-small-charts-with-microsoft-chart-control.aspx</link><pubDate>Wed, 05 Nov 2008 04:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9042443</guid><dc:creator>alexgor</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/alexgor/comments/9042443.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alexgor/commentrss.aspx?PostID=9042443</wfw:commentRss><description>&lt;P&gt;Designing a chart when you have limited space available or when it's size can be dynamically changed&amp;nbsp; usually requires additional planning. I've been playing with a way to display sample data in a 300 by 500 pixels chart and here what I came up with:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/CreatingsmallchartswithMicrosoftChartCon_F13B/image_6.png" mce_href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/CreatingsmallchartswithMicrosoftChartCon_F13B/image_6.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=300 alt=image src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/CreatingsmallchartswithMicrosoftChartCon_F13B/image_thumb_3.png" width=501 border=0 mce_src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/CreatingsmallchartswithMicrosoftChartCon_F13B/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Figure 1: Chart size 300 by 500 pixels.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;I was pretty happy with the results until I resized the chart to the actual required size of 200 by 220 pixels. So how can I fix that? I thought about that for a while and come up with the best practices below...&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/CreatingsmallchartswithMicrosoftChartCon_F13B/image_11.png" mce_href="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/CreatingsmallchartswithMicrosoftChartCon_F13B/image_11.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=197 alt=image src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/CreatingsmallchartswithMicrosoftChartCon_F13B/image_thumb.png" width=440 border=0 mce_src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/CreatingsmallchartswithMicrosoftChartCon_F13B/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Figure 2: Chart size 200 by 220 pixels. Best practices applied to the right chart.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Best Practices of Creating Small Charts&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;You can apply this to a small chart you want to integrate into your application or use same approach 'dynamically' if you need to support the chart which may change it's size dynamically. There is no single solution that will work in all cases, so you need to understand what you can do and what is the best for your application.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Don't panic! Will fix it!&lt;/STRONG&gt; &lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Chart Legend &lt;/STRONG&gt;&lt;BR&gt;Legend displays important information in the chart but it also may require significant amount of chart space. Here is what you can do to optimize for space: &lt;BR&gt;
&lt;UL&gt;
&lt;LI&gt;Hide legend if it is not essential for your chart &lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Restrict how much size legend may possible take. This can be achieved using &lt;STRONG&gt;Chart.Legends[0].MaximumAutoSize&lt;/STRONG&gt; property. The default value is 50 and it means that legend can take up to 50% of chart size. You can set this value to 25-30%. &lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Change the position and layout style of the legend. By positioning Legend on the bottom in one row we can defiantly save some space in the chart. &lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Make sure legend text is auto-fitted &lt;STRONG&gt;IsTextAutoFit&lt;/STRONG&gt; and set &lt;STRONG&gt;AutoFitMinFontSize&lt;/STRONG&gt; property of the legend to 5, to reduce the smallest possible font used by auto-fit algorithm. &lt;BR&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Series Data Points&lt;/STRONG&gt; &lt;BR&gt;Consider removing borders, shadows and visual effects which will make it harder to read small chart. Replace data point labels with tooltips. &lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Chart Titles&lt;/STRONG&gt; &lt;BR&gt;Consider which titles are essential for your chart and make a decision to remove them or to reduce font. This applies to chart, legend and axes titles. &lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Axes Labels&lt;/STRONG&gt; &lt;BR&gt;Axes labels can be too long, font too big or there can be just too many of them. Here what you can do: &lt;BR&gt;
&lt;UL&gt;
&lt;LI&gt;Make sure axes labels auto fitting is enabled &lt;STRONG&gt;IsLabelAutoFit=True&lt;/STRONG&gt;. You can also adjust &lt;STRONG&gt;LabelAutoFitStyle&lt;/STRONG&gt; property to achieve a specific label behavior.&amp;nbsp; &lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Show numeric values in thousands, millions and so on. You can do that by specifying the labels format string in your code. If you do not know what will be the range of your data, the best approach is to use &lt;STRONG&gt;Customize&lt;/STRONG&gt; event and check &lt;STRONG&gt;Maximum&lt;/STRONG&gt; property of your axis. Here is a sample format string you can use: &lt;STRONG&gt;&lt;BR&gt;
&lt;DIV style="BORDER-RIGHT: #7f9db9 1px solid; BORDER-TOP: #7f9db9 1px solid; FONT-SIZE: 11px; OVERFLOW: auto; BORDER-LEFT: #7f9db9 1px solid; LINE-HEIGHT: 100%! important; BORDER-BOTTOM: #7f9db9 1px solid; FONT-FAMILY: courier new; BACKGROUND-COLOR: white"&gt;
&lt;TABLE class="" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; MARGIN: 2px 0px; WIDTH: 99%; BORDER-BOTTOM: #eee 0px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #fff; BORDER-RIGHT-WIDTH: 0px" cellSpacing=0 cellPadding=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="PADDING-LEFT: 10px; FONT-SIZE: 11px; BORDER-BOTTOM: #f7f7f7 1px solid; FONT-FAMILY: courier new; WHITE-SPACE: nowrap"&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;Chart1.ChartAreas[0].AxisY.LabelStyle.Format = &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"$#,,,.B;($#,,,.B);0"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/STRONG&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;If there are too many labels you can change the &lt;STRONG&gt;Interval&lt;/STRONG&gt; property of the axis or switch to the dynamic interval using the IntervalAutoMode property of the axis. &lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Truncate categorical strings. Using Customize event you can get access to the automatically generated chart labels and customize them. Code below will truncate all labels larger than 10 characters. Full text of the label will be shown in the tooltip. &lt;BR&gt;&lt;BR&gt;
&lt;DIV style="BORDER-RIGHT: #7f9db9 1px solid; BORDER-TOP: #7f9db9 1px solid; FONT-SIZE: 11px; OVERFLOW: auto; BORDER-LEFT: #7f9db9 1px solid; LINE-HEIGHT: 100%! important; BORDER-BOTTOM: #7f9db9 1px solid; FONT-FAMILY: courier new; BACKGROUND-COLOR: white"&gt;
&lt;TABLE class="" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; MARGIN: 2px 0px; WIDTH: 99%; BORDER-BOTTOM: #eee 0px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #fff; BORDER-RIGHT-WIDTH: 0px" cellSpacing=0 cellPadding=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="PADDING-LEFT: 10px; FONT-SIZE: 11px; BORDER-BOTTOM: #f7f7f7 1px solid; FONT-FAMILY: courier new; WHITE-SPACE: nowrap"&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;&lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;protected&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;void&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt; Chart2_Customize(&lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;object&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt; sender, EventArgs e)&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;{&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;foreach&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt; (ChartArea area &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;in&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt; ((Chart)sender).ChartAreas)&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;foreach&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt; (Axis axis &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;in&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt; area.Axes)&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;if&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt; (axis.Name.StartsWith(&lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"X"&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;))&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;foreach&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt; (CustomLabel label &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;in&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt; axis.CustomLabels)&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;if&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt; (String.IsNullOrEmpty(label.ToolTip))&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; label.ToolTip = label.Text;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;if&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt; (label.Text.Length &amp;gt; 10)&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; label.Text = label.Text.Substring(0, 10) + &lt;/FONT&gt;&lt;FONT style="COLOR: blue"&gt;"..."&lt;/FONT&gt;&lt;FONT style="FONT-SIZE: 11px"&gt;;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;}&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" style="BACKGROUND-COLOR: #f7f7f7"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;BR&gt;&lt;BR&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Visual Border&lt;/STRONG&gt; &lt;BR&gt;If you are using the visual rounded border around the chart consider disabling this feature. &lt;BR&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Hope this was helpful! &lt;/P&gt;
&lt;P&gt;Alex.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9042443" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alexgor/archive/tags/Chart/default.aspx">Chart</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/Windows+Forms/default.aspx">Windows Forms</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/.NET+Framework/default.aspx">.NET Framework</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/Microsoft+Chart+Control/default.aspx">Microsoft Chart Control</category></item><item><title>Microsoft Chart control for .NET Framework Released!</title><link>http://blogs.msdn.com/alexgor/archive/2008/10/27/microsoft-chart-control-for-net-framework-released.aspx</link><pubDate>Mon, 27 Oct 2008 06:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9017444</guid><dc:creator>alexgor</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/alexgor/comments/9017444.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alexgor/commentrss.aspx?PostID=9017444</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri&gt;I glad to announce the release of&amp;nbsp;Microsoft Chart for .NET Framework 3.5 SP1, which includes the ASP.NET and Windows Forms Chart Controls. Our Data Visualization team in SSRS worked really hard to deliver those controls!&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri&gt;&lt;IMG title="Chart samples" style="WIDTH: 644px; HEIGHT: 128px" height=128 alt="Chart samples" src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/ImagesPlaceHolder_C305/ChartSamples_thumb_1.jpg" width=644 align=absMiddle mce_src="http://blogs.msdn.com/blogfiles/alexgor/WindowsLiveWriter/ImagesPlaceHolder_C305/ChartSamples_thumb_1.jpg"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri&gt;Here is where you can download it:&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri&gt;&lt;A class="" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=130F7986-BF49-4FE5-9CA8-910AE6EA442C&amp;amp;displaylang=en" target=_blank mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyId=130F7986-BF49-4FE5-9CA8-910AE6EA442C&amp;amp;displaylang=en"&gt;Microsoft Chart Controls for Microsoft .NET Framework 3.5&lt;/A&gt; – This installs the ASP.NET and Windows Forms Controls.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The assemblies will be installed in the GAC as well as in the “%Program File%\Microsoft Chart Controls\Assemblies” folder.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If you build an application using the controls, your setup and deployment should add MSChart.exe installer as a pre-requisite.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri&gt;&lt;A class="" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=581FF4E3-749F-4454-A5E3-DE4C463143BD&amp;amp;displaylang=en" target=_blank mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyId=581FF4E3-749F-4454-A5E3-DE4C463143BD&amp;amp;displaylang=en"&gt;Microsoft Chart Controls for Microsoft .NET Framework 3.5 Language Pack&lt;/A&gt; – This installs the language pack for the Chart Controls.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It is available in 23 .NET Framework languages.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri&gt;&lt;A class="" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=1D69CE13-E1E5-4315-825C-F14D33A303E9&amp;amp;displaylang=en" target=_blank mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyId=1D69CE13-E1E5-4315-825C-F14D33A303E9&amp;amp;displaylang=en"&gt;Microsoft Chart Controls Add-on for Microsoft Visual Studio 2008&lt;/A&gt; – This installs the IntelliSense file in English for the controls and also adds the controls to the toolbox for ASP.NET and Windows Forms.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;FONT face=Calibri&gt;Where to&amp;nbsp;find more information?&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&lt;A class="" href="http://social.msdn.microsoft.com/Forums/en-US/MSWinWebChart/threads/" target=_blank mce_href="http://social.msdn.microsoft.com/Forums/en-US/MSWinWebChart/threads/"&gt;Microsoft Chart Forum&lt;/A&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri&gt;&lt;A class="" href="http://code.msdn.microsoft.com/mschart" target=_blank mce_href="http://code.msdn.microsoft.com/mschart"&gt;ASP.NET Samples&lt;/A&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri&gt;&lt;A class="" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=EE8F6F35-B087-4324-9DBA-6DD5E844FD9F&amp;amp;displaylang=en" target=_blank mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyId=EE8F6F35-B087-4324-9DBA-6DD5E844FD9F&amp;amp;displaylang=en"&gt;Documentation&lt;/A&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;Alex.&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9017444" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alexgor/archive/tags/Chart/default.aspx">Chart</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/Windows+Forms/default.aspx">Windows Forms</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/.NET+Framework/default.aspx">.NET Framework</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.msdn.com/alexgor/archive/tags/Microsoft/default.aspx">Microsoft</category></item></channel></rss>