Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
370
ArgumentOutofRangeException with ultraChart.SaveTo(stream, System.Drawing.Imaging.ImageFormat.Png, new Size(ultraChart.Width, ultraChart.Height), new SizeF(1f, 1f));
posted

Does anyone know the reason why ultraChart SaveTo method is throwing ArgumentOutofRangeException?. This method has been working for three months and all of a sudden started throwing this exception. Below is my code

private

ChartEntity GetChartImage(Infragistics.Win.UltraWinChart.UltraChart  ultraChart)
{
//generate chart
MemoryStream stream = new MemoryStream();
ultraChart.SaveTo(stream, System.Drawing.Imaging.
ImageFormat.Png, new Size(ultraChart.Width, ultraChart.Height), new SizeF(1f, 1f));
ChartEntity newEntity = new ChartEntity();
newEntity.Image =
Image.FromStream(stream);
return newEntity;

}

Parents
No Data
Reply
  • 28496
    Offline posted

    i'm not entirely sure, but a better argument for the resolution argument (the last one) would be new SizeF(72f, 72f).

    if that doesn't fix it, please post the call stack for the exception.

Children