How Do I Group X Axis Data? RRS feed

  • Question

  • This is my first attempt to use a Chart Control, it's not as easy as I thought it would be.  I'm using VS 2010 with 4.0 Framework, C# as my language.  I want to create a column graph for our school system, the Y Axis will contain avg. Achievement scores for High, Middle, and Elementary Schools.  The X axis needs to group these values for the High, Middle, and Elementary schools, but also show this year and last year, so on the X axis I'll have two values: 2013 and 2014, and High, Middle, and Elementary data.

    I'm using a stored procedure to bind the data, it's returning a simple set of data, as below:

    schoolLevel	endYear	Achievement
    1	        2012	        61.123718209270231384
    1	        2013	        62.762664622991277671
    2	        2012	        56.723229557733745300
    2	        2013	        58.394527677983849957
    3	        2012	        57.091056787238600678
    3	        2013	        60.470820836869198578

    I've played with this for hours, and below is the closest thing I've done to get it to work out.  I have one series, the Y Axis value is Achievement, and the X axis value is schoolLevel.  If I set "IsXValueIndexed" to True, it will show both years of data for each school level, but it doesn't group the columns, and it doesn't display the year values.  Below is a screenshot that will show what it's looking like.  Is there something really simple that I'm not doing right?  Or really hard for that matter?

    Friday, January 10, 2014 4:53 PM