User (Legacy) Posted January 5, 2004 Report Share Posted January 5, 2004 Hello, Support Is it possible to export a chart to some format and don't lose the transparency? The single useful export format I found is Bitmap. But Bitmap doesn't support transparency. May be it is possible to get from the ChartFX chart some standard .NET class such as Image or Bitmap? Thanks Link to comment Share on other sites More sharing options...
Software FX Posted January 5, 2004 Report Share Posted January 5, 2004 What transparency ? If you are talking about the transparency of the bars and other objects in the chart, exporting to a bitmap will not loose these visual attributes as the result of a semi-transparent color when combined with others is just another color. If you are talking about the chart itself being transparent so that the chart image can be superimposed over another image after it is exported, this is not supported. -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
Software FX Posted January 5, 2004 Report Share Posted January 5, 2004 You may want to try the following ... chart1.SmoothFlags = SmoothFlags.Border | SmoothFlags.Fill; chart1.BackColor = Color.FromArgb(200,200,120); chart1.InsideColor = chart1.BackColor; MemoryStream memStream = new MemoryStream(); chart1.Export(FileFormat.Bitmap,memStream); memStream.Position = 0; Bitmap bmp = (Bitmap) Bitmap.FromStream(memStream); bmp.MakeTransparent(chart1.BackColor); Note that you do not want the text to be smoothed because this will generate "shades" in the text that will be a slightly darker color than the background. You can comment the line that sets the InsideColor if you do not want that area to be transparent. It is important that the color you pick for the background is not used anywhere in the chart or you get transparency somewhere else. I tested this code assigning this bitmap to a picture box's image property. -- Regards, JC Software FX Support "Konstantin Sokolovskiy" <sokol@inbox.ru> wrote in message news:5p1bb950DHA.3512@WEBSERVER1... > Hello, Support > > Is it possible to export a chart to some format and don't lose the > transparency? The single useful export format I found is Bitmap. But Bitmap > doesn't support transparency. May be it is possible to get from the ChartFX > chart some standard .NET class such as Image or Bitmap? > > Thanks > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.