How get rid of the border in Tchart.

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

How get rid of the border in Tchart.

Post by Frances » Thu Jan 15, 2009 4:12 am

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.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jan 15, 2009 9:03 am

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;
		}
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Frances
Newbie
Newbie
Posts: 39
Joined: Fri Oct 19, 2007 12:00 am
Location: Netherlands

Post by Frances » Fri Jan 16, 2009 12:37 am

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.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Jan 16, 2009 9:58 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Jan 26, 2009 3:05 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply