Hello,
I am having an issue exporting a chart to a graphics file. Everything works as expected when the chart is on a form by itself, but when the chart is included in a tab control the chart panel always comes out black. I have a project to demonstrate, but it is too big to post; I would be happy to send via email.
Mark
Issue Exporting Chart To Graphics
Re: Issue Exporting Chart To Graphics
Hello Mark,
Thanks,
It doesn't necessary to add folders bin and obj. Please remove folders and try again to upload your project. If you doesn't achieve to attach project in the thread, you could add it to upload page.I have a project to demonstrate, but it is too big to post; I would be happy to send via email.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Issue Exporting Chart To Graphics
Hello,
Thank you, attached is the project.
Mark
Thank you, attached is the project.
Mark
- Attachments
-
- TChartExport.zip
- Example Project Workspace
- (17.58 KiB) Downloaded 352 times
Re: Issue Exporting Chart To Graphics
Hello MarkR,
I have found where the problem is. I you needs put Transparency=0. Please, change code of export button for next, and check if works as you want.
I hope will helps.
Thanks,
I have found where the problem is. I you needs put Transparency=0. Please, change code of export button for next, and check if works as you want.
Code: Select all
private void button1_Click(object sender, EventArgs e)
{
string strMoeGraphFilename = "TChartExport";
this.tChart1.Focus();
this.tChart1.BackColor = Color.White;
this.tChart1.Panel.Color = Color.White;
this.tChart1.Walls.Back.Color = Color.White;
this.tChart1.Panel.Transparency=0;
strMoeGraphFilename += ".bmp";
this.tChart1.Export.Image.Bitmap.ColorReduction = Steema.TeeChart.Export.BitmapFormat.BMPColorReduction.Default;
this.tChart1.Export.Image.Bitmap.Save(Application.StartupPath + "\\" + strMoeGraphFilename);
this.tChart1.BackColor = Color.Transparent;
this.tChart1.Panel.Visible = false;
this.tChart1.Walls.Back.Color = Color.Black;
this.tChart1.Walls.Back.Transparent = false;
this.tChart1.Walls.Back.Brush.Gradient.Visible = false;
}
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Issue Exporting Chart To Graphics
Sandra,
Thank you. You might have noticed that in my original code that I submitted I had this line commented out, I was trying to see if this would resolve the issue. Additionally, I had "this.tChart1.Panel.Transparent = false;" set in the constructor. Now the interesting part, when I set the "this.tChart1.Panel.Transparency = 0;" on my main development machine I get the background color to show correctly in the saved graphic file, but on my other office machine the panel still shows as black.
I will contine to look into this issue on my side to see if there is more information that I could provide to you to help decipher this issue. I am wondering if there is some rendering issues related to specific video cards?
Thanks,
Mark
Thank you. You might have noticed that in my original code that I submitted I had this line commented out, I was trying to see if this would resolve the issue. Additionally, I had "this.tChart1.Panel.Transparent = false;" set in the constructor. Now the interesting part, when I set the "this.tChart1.Panel.Transparency = 0;" on my main development machine I get the background color to show correctly in the saved graphic file, but on my other office machine the panel still shows as black.
I will contine to look into this issue on my side to see if there is more information that I could provide to you to help decipher this issue. I am wondering if there is some rendering issues related to specific video cards?
Thanks,
Mark
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Issue Exporting Chart To Graphics
Hi Mark,
Not that we are aware of.I am wondering if there is some rendering issues related to specific video cards?
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |