I am trying to saveAs the zedgraph diagram that my program creates. The problem is that when i use that code it saves the image but only the labels on top of the bars appear...no bars are displayed.
chart1.SaveAs();
Am i missing something?
The code that creates the diagram:
GraphPane myPane = chart1.GraphPane;
myPane.XAxis.Scale.Format = "F0";
//create the bars
BarItem myCurve = myPane.AddBar("Width", pointPairListWidth, Color.Black);
myCurve.Bar.Fill.Type = FillType.Solid;
BarItem myCurve2 = myPane.AddBar("Height", pointPairListHeight, Color.Gray);
BarItem.CreateBarLabels(myPane, false, "f0");
chart1.AxisChange();
chart1.Invalidate();
chart1.Refresh();
ANSWER:
chart1.GraphPane.GetImage().Save("pic.jpg");