User (Legacy) Posted December 13, 2004 Report Share Posted December 13, 2004 Hi, I am trying to import a stream (Metafile) into a chart and got "Index was outside the bounds of the array" exception. Sample code: Chart chart = new Chart(); chart.Location = new System.Drawing.Point(0, 0); chart.Size = new System.Drawing.Size(200, 200); chart.NSeries = 1; chart.NValues = 10; chart.Import(myStream); //myStream is a MemoryStream of Metafile format I also tried: chart.Import(FileFormat.Metafile, myStream); //myStream is a MemoryStream of Metafile format then got "Import: Invalid format value (Metafile)" exception. Please help. Thanks. Ming Link to comment Share on other sites More sharing options...
Software FX Posted December 13, 2004 Report Share Posted December 13, 2004 I read that you are trying to IMPORT the chart from a metafile. This is not possible, a chart contains a lot of information, data, properties, etc. A metafile is just a picture. You can export the chart to a metafile but you can not import one from it, it is kind of like you can export a screenshot of your screen into a bitmap but you can not import that bitmap and recreate the state of your computer at that moment just from the bitmap. -- FP Software FX Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.