Page 1 of 1
Saving bar graphs as metafile
Posted: Thu Jan 08, 2009 5:16 am
by 14045174
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.
Posted: Thu Jan 08, 2009 8:46 am
by narcis
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.
Posted: Thu Jan 08, 2009 9:22 am
by 14045174
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.
Posted: Thu Jan 08, 2009 9:37 am
by narcis
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.