Connecting Tech Pros Worldwide Help | Site Map

How to substitute labels on the X axis using Chart Control of the Visual Studio 2008

Newbie
 
Join Date: Sep 2009
Posts: 1
#1: Sep 29 '09
I need to show actual values from Series on the X axis of the chart instead of default ones. How to do so using Chart Control of the Visual Studio 2008 Professional?

Code (just in case) is placed below. Thank you, Terry.

Expand|Select|Wrap|Line Numbers
  1. private void showChart(object dataSource)
  2. {
  3.     if (TabControlMain.TabPages.Count == 2) 
  4.     { 
  5.  TabControlMain.TabPages.Add(tabChart); 
  6.     } 
  7.     TabControlMain.SelectedTab = TabControlMain.TabPages[2]; 
  8.     chartCyt.DataSource = dataSource; 
  9.     chartCyt.Series[0].XValueMember = "Concentration"; 
  10.     chartCyt.Series[0].YValueMembers = "Mean"; 
  11.     chartCyt.Series[0].LegendText = "Mean";
  12.     chartCyt.Series[1].XValueMember = "Concentration";
  13.     chartCyt.Series[1].YValueMembers = "Stddev";
  14.     chartCyt.Series[1].LegendText = "StdDev";
  15. }
Reply

Tags
.net, chart control