Group: Forum Members
Last Active: 8 Years Ago
Posts: 13,
Visits: 10
|
Hi There,
I'm getting the following exception while converting my graph into stream.
"The Chart document is not connected to a view."
Below is the code I've used to do that MemoryStream memStream = new MemoryStream(); NChartControl1.ImageExporter.SaveToStream(memStream,new NJpegImageFormat());
Please let me know how to resolve this issue.
Thanks, Naveen Anne.
|
Group: Forum Members
Last Active: Yesterday @ 1:54 AM
Posts: 3,054,
Visits: 4,009
|
Hi Naveen, You have to specify size/resolution of the generated image in case the chart document is not connected to a view and cannot obtain those parameters from there - the following code shows how to generate a 300x300 image with screen resolution (96dpi): MemoryStream memStream = new MemoryStream();nChartControl.ImageExporter.SaveToStream(memStream, new NSize(300, 300), new NResolution(96, 96), new NJpegImageFormat());
Best Regards, Nevron Support Team
|
Group: Forum Members
Last Active: 8 Years Ago
Posts: 13,
Visits: 10
|
Hi,
That works gr8 thx for that.
Naveen Anne.
|