Does anyone know how to hide zero values when using LineItem (zedgraph)?
The code below shows my intention. I tried hide zero values of list2.
double x, y1, y2;
PointPairList list1 = new PointPairList();
PointPairList list2 = new PointPairList();
for (int i = 0; i < data.GetLength(0); i++)
{
x = (double)i;
y1 = data[i, 0];
y2 = data[i, 1];
list1.Add(x, y1);
if (y2 < 2)
{
list2.Add(x,0);
}
else
{
list2.Add(x, y2);
}
}
LineItem myCurve = myPane.AddCurve("N", list1, Color.Red, SymbolType.Default);
myCurve.Symbol.Size = 2;
LineItem myCurve2 = myPane.AddCurve("P", list2, Color.Blue, SymbolType.Default);
myCurve2.Line.IsVisible = false;
myCurve2.Symbol.Size = 1;