Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
180
Broken lines in 2D (scatter) line charts?
posted

Hi,

I have a requirement to somehow break the line if a datapoint is marked as invalid. There are 2 questions:

- How to mark it, i.e. can I use a special Y-value (null, infinite, ..) to use?

-  How to draw it?

  a) if no line at all should be drawn between 2 valid data points when an invalid one is between them?

  b) if a dashewd line should be drawn in this case?

/Efim

Parents
No Data
Reply
  • 75
    Suggested Answer
    posted

    I kinda got this working in my case. However, it may not work in all cases.

    I manually populated the series DataPoints collection, instead of using the DataSource. For each data point, you can set the Fill property. By setting the Fill of some of the data points to Brushes.Transparent, I was able to get a dashed line effect. This requires that you have sufficient data points.

    It would be preferable if we could provide a System.Windows.Media.Pen.

    Wally

Children
No Data