Page 1 of 1

Export in Editor produce black background

Posted: Fri May 02, 2008 2:57 pm
by 9642375
I am evaluating 3.2.3016.15524 evaluation version. Export in Editor produce black background for Bitmap, jpg, gif formats. PDF looks OK.

Any idea? I saw some postings for different versions, is it still a BIG probelm for v3?

I will try to upload the project.

Thanks,

Michael

I have uploaded a sample project

Posted: Fri May 02, 2008 3:43 pm
by 9642375
Hi,

I have uploaded TeeChartV3Test.zip

As comparison with the Exporting in Editor, I also add a button using:
tChart1.Export.Image.....Save(fileName);
The results are the same: JPG, BMP and GIF has black backgrounds; while PDF, TIFF, PNG, wmf, wmf, htm, xaml are OK.
A separate button save bitmap to file, using workarounds:
tChart1.Graphics3D.UseBuffer = false;
Rectangle rect = new Rectangle(0, 0, tChart1.Width, tChart1.Height);
Bitmap bmp = new Bitmap(rect.Width, rect.Height);
tChart1.DrawToBitmap(bmp, rect);
bmp.Save(@"C:\chart11.bmp");
works OK.
However, we have places allow user to use Editor directly.

Thanks,
Michael

Posted: Mon May 05, 2008 8:20 am
by narcis
Hi Michael,

Thanks for the information and example project. I could reproduce the issue here and added it as a high priority item (TF02013027) to be fixed for next maintenance releases.

Posted: Mon May 05, 2008 9:35 am
by narcis
Hi Michael,
I am evaluating 3.2.3016.15524 evaluation version. Export in Editor produce black background for Bitmap, jpg, gif formats. PDF looks OK.
This is because those image formats don't support transparency. We have now enhanced the editor to display panel's color in such cases. For transparent backgrounds you need to use png, emf or tiff formats.

Using line below also works fine for us here.

Code: Select all

        public Form1()
        {
            InitializeComponent();
						tChart1.Panel.Transparent = true;
            bar1.FillSampleValues();
        }

        private void button1_Click(object sender, EventArgs e)
        {
					tChart1.Graphics3D.UseBuffer = false;
					tChart1.Export.Image.Bitmap.Save(@"c:\temp\bitmaptest.bmp");
					tChart1.Graphics3D.UseBuffer = true;

        }
I'm also going to send you modified project which.