Saving bar graphs as metafile

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
UserLS
Advanced
Posts: 247
Joined: Wed May 23, 2007 12:00 am

Saving bar graphs as metafile

Post by UserLS » Thu Jan 08, 2009 5:16 am

I have a rectangular bar graph, which is using gradient fill. I am trying to save it to a metafile (EmfPlusOnly). If I set relative gradient to false - it works, but if relative gradient is set to true, then all I get is either hollow bars or partially hollow bars. Either make it work or remove the option from screen.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jan 08, 2009 8:46 am

Hi UserLS,

Code below works fine for me here using latest TeeChart for .NET v3 release available at the client area. Can you please modify it so that we can reproduce the issue here?

Code: Select all

		public Form1()
		{
			InitializeComponent();
			InitializeChart();
		}

		private void InitializeChart()
		{
			Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);

			bar1.FillSampleValues();
			bar1.Gradient.Visible = true;
			bar1.GradientRelative = true;

			tChart1.Export.Image.Metafile.EMFFormat = System.Drawing.Imaging.EmfType.EmfOnly;
			tChart1.Export.Image.Metafile.Save(@"c:\temp\bargradient.emf");
		}
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

UserLS
Advanced
Posts: 247
Joined: Wed May 23, 2007 12:00 am

Post by UserLS » Thu Jan 08, 2009 9:22 am

I still have to take time and load the Dec19 version, but first I need to finish a few things. One thing in your code: you are using EmfOnly and we need EmfPlusOnly - this one is not working (at least in the Nov3 release).

Thanks.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jan 08, 2009 9:37 am

Hi UserLS,

Sorry, my fault. I could reproduce the issue here using EMFFormat setting you mentioned and added the defect to the list (TF02013693). In the meantime you can use EmfOnly.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply