Export in Editor produce black background

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Michael_Xu
Newbie
Newbie
Posts: 11
Joined: Fri Sep 01, 2006 12:00 am

Export in Editor produce black background

Post by Michael_Xu » Fri May 02, 2008 2:57 pm

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

Michael_Xu
Newbie
Newbie
Posts: 11
Joined: Fri Sep 01, 2006 12:00 am

I have uploaded a sample project

Post by Michael_Xu » Fri May 02, 2008 3:43 pm

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

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

Post by Narcís » Mon May 05, 2008 8:20 am

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.
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

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

Post by Narcís » Mon May 05, 2008 9:35 am

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.
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