User (Legacy) Posted June 8, 2005 Report Share Posted June 8, 2005 I am Exporting Chart data in a binary form using the following lines of code MemoryStream ms = new MemoryStream(); chart.FileMask = chart.FileMask | FileMask.Fonts; chart.Export( FileFormat.Binary, ms ); I expect that this exports only 'Fonts' related data. But that is not what happens. When I import this saved data into a new chart using newChart.Import(FileFormat.Binary, ms ); it imports all the data of the previous chart not just the font data. What's going on. - priyanka Link to comment Share on other sites More sharing options...
Software FX Posted June 9, 2005 Report Share Posted June 9, 2005 If you want to export ONLY the Fonts data you would have to do something like chart1.FileMask = FileMask.Fonts; If you OR the current FileMask value you are esentially adding all the existent FileMask bits and FileMask.Fonts. JC SoftwareFX Support "Priyanka" <priyankan@hotmail.com> wrote in message news:FIYJlxGbFHA.4092@webserver3.softwarefx.com... >I am Exporting Chart data in a binary form using the following lines of >code > > MemoryStream ms = new MemoryStream(); > chart.FileMask = chart.FileMask | FileMask.Fonts; > chart.Export( FileFormat.Binary, ms ); > > I expect that this exports only 'Fonts' related data. But that is not what > happens. > When I import this saved data into a new chart using > > newChart.Import(FileFormat.Binary, ms ); > > it imports all the data of the previous chart not just the font data. > > What's going on. > > - priyanka > Link to comment Share on other sites More sharing options...
User (Legacy) Posted June 9, 2005 Author Report Share Posted June 9, 2005 Except that doesnt work either and ends up saving unexpected things. I did start with chart1.FileMask = FileMask.Fonts; since OR did mean the same thing to me, but that did not do the trick. So, I went back to the documentation, that read To save just colors and titles attributes: [Visual Basic] Chart1.FileMask = Chart1.FileMask Or FileMask.Colors Or FileMask.Titles [C#] chart1.FileMask = chart1.FileMask | FileMask.Colors | FileMask.Titles; That lead me to using the other path which doesnt work either. Please help me sort this out. "Software FX Support" <none@noreply.com> wrote in message news:n62mOoRbFHA.200@webserver3.softwarefx.com... > If you want to export ONLY the Fonts data you would have to do something > like > > chart1.FileMask = FileMask.Fonts; > > If you OR the current FileMask value you are esentially adding all the > existent FileMask bits and FileMask.Fonts. > > JC > SoftwareFX Support > > "Priyanka" <priyankan@hotmail.com> wrote in message > news:FIYJlxGbFHA.4092@webserver3.softwarefx.com... >>I am Exporting Chart data in a binary form using the following lines of >>code >> >> MemoryStream ms = new MemoryStream(); >> chart.FileMask = chart.FileMask | FileMask.Fonts; >> chart.Export( FileFormat.Binary, ms ); >> >> I expect that this exports only 'Fonts' related data. But that is not >> what happens. >> When I import this saved data into a new chart using >> >> newChart.Import(FileFormat.Binary, ms ); >> >> it imports all the data of the previous chart not just the font data. >> >> What's going on. >> >> - priyanka >> > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.