I am using
System.Windows.Forms.DataVisualization.Charting.Chart
reference and I wand to build a chart without chart element in my winform UI , I just want to create a chart with code and store it as an image. but after code runs I got and empty image saved. my code :
Chart ch = new Chart();
ch.Series.Add("tt");
ch.Series["tt"].Points.AddXY(1, 10);
ch.Series["tt"].Points[0].SetValueY(4);
string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "savedImg.jpg");
ch.SaveImage(path, ChartImageFormat.Jpeg);
and here is the output : enter image description here
please help me .