1
votes

I have downloaded the TeeChart for .Net 2012 Evaluation version.

I have worked for 2 days trying to get transparency to work on the pie chart, circular gauge, and line chart. Everything I try does not change the black color.

Here is some of the sample code I have used in my attempt to make it transparent.

        pieChart.Series.Clear();

        pieChart.Header.Visible = true;
        pieChart.Header.Text = "Pie Chart";         //At top on the chart

        pieChart.Aspect.View3D = false;
        pieChart.Walls.Back.Transparent = true;
        pieChart.Walls.Back.Gradient.Visible = false;

        pieChart.Panel.Transparent = true;
        pieChart.Panel.Gradient.Visible = true;
        pieChart.Panel.Brush.Transparency = 50;

        pie.Add(10,Color.Red);
        pie.Add(15, Color.Green);
        pie.Add(10, Color.PowderBlue);
        pie.Add(15, Color.DarkGoldenrod);
        pie.Add(10, Color.Bisque);
        pie.Marks.Style = Steema.TeeChart.Styles.MarksStyles.Percent;

        pieChart.Series.Add(pie);

The colors in the slices work as expected. I have tried changing the colors of Palettes, background color, canvas, and wall and nothing seems to work. I cannot find any documentation that give any explanation of what these objects are either to know if I am using each correctly. Please note that in each attempt only 1 was used as a time.

I am exporting the image to a PNG if that makes a difference - both to the stream and to a file. Is transparency a feature of the full version or something that can be done in the trial version? Please confirm as transparent charts are a requirement for our decision to buy this version.

Thanks

PS - It would be nice to also have access to the .Net documentation (The Java version, via the documentation, does not seem to be a direct comparison http://www.steema.com/files/public/teechart/java/v1/docs/JavaDoc/overview-summary.html)

1

1 Answers

0
votes

I get a transparent chart using the code you posted in a WinForms application. They key is Panel.Transparent property. You can check that painting the form in a very visible color, eg.:

  this.BackColor = Color.Red;

Exporting this chart to PNG also creates a transparent image for me. At run-time you need to set BufferStyle to BufferStyles.None before exporting, for example:

  Steema.TeeChart.Drawing.BufferStyle buffer = chart1.Graphics3D.BufferStyle;
  chart1.Graphics3D.BufferStyle = Steema.TeeChart.Drawing.BufferStyle.None;
  chart1.Export.Image.PNG.Save(@"C:\temp\TransparentWebChart.png");
  chart1.Graphics3D.BufferStyle = buffer;

Does this work fine for you? Which kind of application are you developing (WinForms, WebForms, WFP, Silverlight, WP7, etc.)?

Regarding the documentation, both evaluation and registered installerse include help file and tutorials shortcuts at the program group TeeChart entry and also in the Docs folder created by the installer.