Pass the value through the constructor.
1 Public Xtrainterpreterchartform (object ds)2 {3 InitializeComponent (); 4 DataSource = ds; 5 }
Set shape, data, etc.:
1 //Create a pie series.2Series series1 =NewSeries ("Bar Series 1", Viewtype.bar);3 ChartControl1.Series.Add (series1);4Chartcontrol1.datasource =DataSource;5 6 //Adjust The value numeric options of the series.7Series1. Argumentdatamember ="Username";8Series1. Valuedatamembers.addrange (New string[] {"WordCount" });9 Ten((Barseriesview) series1. View). Coloreach =true; OneSeries1. Legendpointoptions.pattern ="{A}"; A - //Add a title to the chart and hide the legend. -ChartTitle ChartTitle1 =NewChartTitle {Text ="Translator remaining word count information"}; the ChartControl1.Titles.Add (chartTitle1); -ChartControl1.Legend.Visible =true; - - //ADD the chart to the form. +Chartcontrol1.dock =DockStyle.Fill; -Controls.Add (CHARTCONTROL1);
Dev Bar Chart