我要显示多列图表的数据列, 我已经使用单一的柱形图,但我不能找到绑定另一个Y轴柱,以图表的方式
我有以下格式的数据。
名称数据字段-1数据字段-2
EMP-200 220
EMP-B 150 250
解决方案
我发现下面的链接,这个问题非常有用。 的http://blogs.msdn.com/b/alexgor/archive/2009/02/21/data-binding-ms-chart-control.aspx
如果任何一个有更好的建议比这个请发表。
查找类似下面的另一种解决方案。
双[] ARRAY1 = {2.8,4.4,6.5,8.3,3.6,5.6,7.3};
双[] ARRAY2 = {2.0,4.0,6.1,7.8,2.5,5.0,6.2};
chart1.Series.Add(系列1);
chtStudentResult.Series [系列1] Points.DataBindY(ARRAY1)。
chtStudentResult.Series.Add(系列2);
chtStudentResult.Series [系列2] Points.DataBindY(ARRAY2)。
这将产生所需的多列,列图表。
I need to show the data columns in multiple column chart, I have used single column charts, but I cant find the way to bind another Y-Axis column to the chart
I have data in following format
Name DataField-1 DataField-2
Emp-a 200 220
Emp-b 150 250
解决方案
I have found the following link useful for the problem. http://blogs.msdn.com/b/alexgor/archive/2009/02/21/data-binding-ms-chart-control.aspx
If any one have better suggestion than this please post.
Find another solution like following..
double[] array1 = { 2.8, 4.4, 6.5, 8.3, 3.6, 5.6, 7.3 };
double[] array2 = { 2.0, 4.0, 6.1, 7.8, 2.5, 5.0, 6.2 };
chart1.Series.Add("Series1");
chtStudentResult.Series["Series1"].Points.DataBindY(array1);
chtStudentResult.Series.Add("Series2");
chtStudentResult.Series["Series2"].Points.DataBindY(array2);
It will generate the desired multiple column, column chart.