views:

17

answers:

1

I'm having trouble with my Silverlight Chart. My model is unsorted, that is, the sorting is done on the server side. It needs to support year transitions, but as you can see from the screenshot the charting control automatically sorts the model and fills in the gaps. The line sort be ever increasing and not taking a dip on new year.

How can I make the chart display the data in the order specified in the grid control to the left? Btw, using SL3

alt text

A: 

The line chart is not designed to do the task you seem to be asking. After all the purpose of a line chart is to help the user trace a trend or even visually interpolate an interim value. However if the interval between horizontal points is not linear and always traveling in the same direction such lines meaningless.

I would therefore suggest that the Line chart is not appropriate or that you have some other hidden data which should be used for the Y-axis which would make the lines meaningful.

Alternatives might be to use a Scatter graph or a Column series where the y-axis value has been converted to a string and thus cause the series to use a Category based axis instead of range based one.

AnthonyWJones
Thank you for your answer, although it wasn't what I was hoping for.Changing the graph is pretty much out of the question, or atleast the very last option.I have a few ideas, but I have to check them out first.
Henning
Switching out the graph is out of the question. I added a new property called WeekAsString, which stores the week nr as a string instead of int. Now I got the right curves going, but the X axis aligned to the top. Do you have any idea what could cause this?
Henning