Problem in loading chart on the view in asp.net mvc?
- by mary
hello,
I am working on the chart project in asp.net mvc. i used followinf code to genrate the chart on the controller.
Chart chart1 = new Chart();
chart1.Height = 296;
chart1.Width = 412;
chart1.ImageType = ChartImageType.Png;
Title title = chart1.Titles.Add("Main");
Series series1 = chart1.Series.Add("series1");
chart1.Series["series1"].Points.DataBindXY(xvalues, yvalues);
chart1.Series["series1"].ChartType = SeriesChartType.Column ;
ChartArea chartArea = chart1.ChartAreas.Add("Default");
chartArea.Area3DStyle.Enable3D = false ;
MemoryStream ms = new MemoryStream();
chart1.SaveImage(ms);
return File(ms.GetBuffer(), @"image/png");
and on the view page i am calling it as
when i am running it on local pc its working fine but when i deployed it on server then chart is not displaying instated alernate text is showing. and its not working on another pc also. plz if anyone can know the reson tell me.
thank you.