Page 1 of 1

Export: saved picture has black background

Posted: Sat Jan 21, 2012 2:32 am
by 15661292
Hi,

I am using the export feature to save charts. But the charts are saved with black background, no matter what graphic format I choose. My line of code to export is:
NewChart.Export.Image.Bitmap.Save(SaveFileDialog.FileName)

Your help is appreciated.

Oliver

Re: Export: saved picture has black background

Posted: Mon Jan 23, 2012 11:51 am
by 10050769
Hello Oliver,

I couldn't reproduce using last version of TeeChart.Net and next code:

Code: Select all

        Steema.TeeChart.Styles.Line Line1;
        Steema.TeeChart.Editor editor1;
        private void InitializeChart()
        {
            Line1 = new Line(tChart1.Chart);
            Line1.FillSampleValues();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Steema.TeeChart.Drawing.BufferStyle buffer = tChart1.Graphics3D.BufferStyle;
            tChart1.Graphics3D.BufferStyle = Steema.TeeChart.Drawing.BufferStyle.None;
            tChart1.Export.Image.Bitmap.Save(@"tChart1.bmp");
            tChart1.Export.Image.GIF.Save(@"tChart1.gif");
            tChart1.Export.Image.JPEG.Save(@"tChart1.jpeg");
            tChart1.Export.Image.PNG.Save(@"tChart1.png");
            tChart1.Graphics3D.BufferStyle = buffer;
      }
Can you tell us, if you can reproduce the problem using previous code? On the other hand, can you tell which version of TeeChart are you using?

Thanks,