Page 1 of 1

How get rid of the border in Tchart.

Posted: Thu Jan 15, 2009 4:12 am
by 13047077
Hi, I want to get rid of the border in the tee chart.

I tried the below options, but they don't work either!

m_MyPlot.TChart.BorderBrush = System.Windows.Media.Brushes.Transparent;

m_MyPlot.TChart.BorderThickness = new Thickness(0);

I did try setting BorderBrush to Transparent and BorderThickness to 0 in design mode, but didn't work.

I have uploaded the image file (border.JPG) on your upload page.

Any advice?

Thanks in advance.

Posted: Thu Jan 15, 2009 9:03 am
by narcis
Hi Frances,

You need to set Panel.Bevel as shown here:

Code: Select all

		public Form1()
		{
			InitializeComponent();
			InitializeChart();
		}

		private void InitializeChart()
		{
			this.BackColor = Color.White;

			tChart1.Aspect.View3D = false;

			tChart1.Panel.Color = Color.White;
			tChart1.Panel.Gradient.Visible = false;
			tChart1.Panel.Bevel.Inner = Steema.TeeChart.Drawing.BevelStyles.None;
			tChart1.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;

			tChart1.Walls.Back.Transparent = true;
		}

Posted: Fri Jan 16, 2009 12:37 am
by 13047077
Thanks, It works now.
But, I have one more thing to ask that I have set the panel.color to transparent and looks ok in wpf ui, but when I export it as image, the whole background changes to black and I can't see anything.

Any advice on this?

Thanks in advance.

Posted: Fri Jan 16, 2009 9:58 am
by narcis
Hi Frances,

Thanks for reporting.

As you can see in TeeChart for .NET v3 release notes this was fixed for TF02013027. However, it seems to be broken again so I added the defect to the bug list (TF02013744) to be fixed for next releases. I also found that the only format that works is Metafile. It fails for PNG, BMP, JPG, TIFF and GIF.

Posted: Mon Jan 26, 2009 3:05 pm
by narcis
Hi Frances,

After investigating the issue here we found that code below works fine for us here.

Code: Select all

		public Form1()
		{
			InitializeComponent();
			InitializeChart();
		}

		private void InitializeChart()
		{
			this.BackColor = Color.Red;
			tChart1.Panel.Transparent = true;
		}

		private void button1_Click(object sender, EventArgs e)
		{
			bool useBuffer = tChart1.Graphics3D.UseBuffer;
			tChart1.Graphics3D.UseBuffer = false;
			tChart1.Export.Image.PNG.Save(@"C:\temp\trans.png");
			tChart1.Graphics3D.UseBuffer = useBuffer;
		}
Could you please check if it works fine at your end?

Thanks in advance.