Search code examples
c#zedgraphpoints

How to miss points in a ZedGraph line graph in C#


I have bit of code that draws nice line charts in ZedGraph.

I can not change the code entirely, but I would like to have some of the lines not have a y value for each point on the x-axis.

I can do this in Excel, but I don't know how to in ZedGraph. I create graph with .AddCurve.

How do I do this?


Solution

  • NaN values should do the trick.

    If you want to break the line for example between x=1 and x=2, just add a point (1.5, double.NaN). Zedgraph should make the gap by itself.