Jonno Lord
Jonno Lord

Reputation: 314

ASP Chart with multiple X axis columns

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

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?

Thanks, Jonno

Upvotes: 2

Views: 3343

Answers (1)

Precious Roy
Precious Roy

Reputation: 1086

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 enter image description here

Upvotes: 2

Related Questions