ASP图表与多个X轴列 [英] ASP Chart with multiple X axis columns

查看:143
本文介绍了ASP图表与多个X轴列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两列,营业员和状态SQL表。状态可以是三样东西,金,银,铜奖的。

I have an SQL table with two columns, salesperson and status. The status can be one of three things, gold, silver and bronze.

我如何去创造一个销售员的名字沿x轴显示一次,但上面有他们的名字三列对于每个状态的计数?

How do I go about creating a chart where the salesperson name appears once along the x-axis but has three columns above their name for a count of each status?

谢谢,
Jonno

Thanks, Jonno

推荐答案

如果我理解正确,你试图做这样的事情后:
http://blogs.msdn.com/b/alexgor/archive/2009/02/21/data-binding-ms-chart-control.aspx

If I understand you correctly, you're trying to do something like this post: http://blogs.msdn.com/b/alexgor/archive/2009/02/21/data-binding-ms-chart-control.aspx

您也可以尝试这个例子:

You can also try this example:

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 would create a chart like this

这篇关于ASP图表与多个X轴列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆