Skip to main content

Microsoft Silverlight

Answered Question Inserting lineseries dynamically?RSS Feed

(0)

weeser
weeser

Member

Member

133 points

96 Posts

Inserting lineseries dynamically?

Hi!

I have a chart that has 6 line series on it, 5 of them are lines representing limits of the graph and one is the actual data.  The issue is, the limits may change, and the old and new limits are stored in the database according to date.  The user can selected a range of dates to view the graph in, but in the case the user selects a range of dates where the limits change is a problem.  We want to keep the limits as horizontal lines.  So i was wandering a way to handle a limit change.

All of the lineseries get data through binding, but is there a way to line jump?....or go from one line to the next without drawing in the gap?  My thought was inserting new line series dynamically based on how many limit changes there are, but that will take up a lot of resources and time to insert and remove those lineseries.  Any ideas would be wonderfull Big Smile!

Thanks in advance,

Josh

Josh, AKA Weeser
Kansas State University-Salina

David Anson
David Anson

Participant

Participant

1718 points

212 Posts

Microsoft
Answered Question

Re: Inserting lineseries dynamically?

Josh,

Your idea seems good to me as well. One day we may support "missing data" which you could use to create a line break here - but we don't today and I don't see a good way of telling LineSeries to obscure parts of itself but not others.

One alternative approach would be to NOT use LineSeries for the 5 boundary markers and instead to draw those lines yourself via the Axis APIs. I'm thinking something along the lines of this example: http://leeontech.wordpress.com/2009/02/25/linechart-with-markers/. This should be pretty efficient, I'd think.

Hope this helps!


http://blogs.msdn.com/delay

This posting is provided "AS IS" with no warranties, and confers no rights.

wundarous
wundarous

Member

Member

2 points

9 Posts

Re: Inserting lineseries dynamically?

How about specifying an interpolation method, which would draw data that is missing as a straight line (i.e. the previous point).

For example, let's say I'm plotting time and values:

 

January 1,000

April      1,200

 

Right now the lineseries interpolates from 1,000 to 1,200, and it looks like a diagonal line of growth from January to April. One solution would be to draw the line as 1,000 straight until April, where it jumps to 1,200. It might also be misleading, but it's useful in some cases, whereas the behavior now is not.

 

 

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities