borders at tchart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Friis
Newbie
Newbie
Posts: 26
Joined: Thu Oct 16, 2014 12:00 am

borders at tchart

Post by Friis » Fri Apr 17, 2015 7:51 am

Hi,

In the attached file you will see a part of a tchart with a distinct black border surrounding the image.

I have tried to remove this border using the code:

Code: Select all

Chart.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;
However, it does not help - the black border is still there. What else can I do to remove that border??
Attachments
Chart.png
Chart.png (40.48 KiB) Viewed 11004 times

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

Re: borders at tchart

Post by Narcís » Fri Apr 17, 2015 8:14 am

Hi Friis,

Using this code snippet:

Code: Select all

      tChart1.Series.Add(new Steema.TeeChart.Styles.Line()).FillSampleValues();

      tChart1.Panel.Pen.Visible = false;
      tChart1.Panel.Bevel.Inner = Steema.TeeChart.Drawing.BevelStyles.None;
      tChart1.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;
in an empty chart I get this:
ChartNoPanelPen.jpg
ChartNoPanelPen.jpg (54.82 KiB) Viewed 10963 times
you can also try hiding the chart walls:

Code: Select all

      tChart1.Walls.Visible = false;
If the problem persists at your end please attach a simple example project we can run "as-is" to reproduce the problem here.
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

Friis
Newbie
Newbie
Posts: 26
Joined: Thu Oct 16, 2014 12:00 am

Re: borders at tchart

Post by Friis » Fri Apr 17, 2015 8:30 am

Hi,

I have attached an image generated in the following code.

I have taken the image generated below and then inserted the graph on a white blank page in windows Paint.

as you will see, a thin black line is still present??

Code: Select all

public Form1()
        {
            InitializeComponent();

            tChart1.Series.Clear();
            tChart1.Series.RemoveAllSeries();
            tChart1.Tools.Clear();
            tChart1.Axes.Left.Labels.Items.Clear();

            tChart1.BackColor = Color.White;
            tChart1.Walls.Back.Gradient.Visible = false;
            tChart1.Walls.Back.Color = Color.White;
            tChart1.Walls.Bottom.Gradient.Visible = false;
            tChart1.Walls.Bottom.Color = Color.White;
            tChart1.Panel.Gradient.Visible = false;
            tChart1.Panel.Color = Color.White;
            tChart1.Aspect.View3D = false;
            tChart1.Walls.Visible = false;
            tChart1.Panel.Pen.Visible = false;
            tChart1.Panel.Bevel.Inner = Steema.TeeChart.Drawing.BevelStyles.None;
            tChart1.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;
            tChart1.Panel.Bevel.Width = 0;
            tChart1.Axes.Left.Automatic = true;
            tChart1.Axes.Bottom.Automatic = true;
            tChart1.Axes.Left.Title.Caption = "";
            tChart1.Axes.Bottom.Title.Caption = "";
            tChart1.Header.Text = "";
            tChart1.Legend.Visible = false;
            tChart1.Legend.Shadow.Visible = false;
            tChart1.Legend.Font.Size = 14;
            tChart1.Legend.Symbol.Width = 50;
            tChart1.Legend.Symbol.Squared = true;


            if (tChart1.Axes.Custom.Count > 0)
            {
                tChart1.Axes.Custom.Clear();
            }

            tChart1.Export.Image.Bitmap.Save(@"C:\Temp\jkhfw.bmp");
        }
Attachments
Untitled.png
Untitled.png (4.85 KiB) Viewed 10960 times

Friis
Newbie
Newbie
Posts: 26
Joined: Thu Oct 16, 2014 12:00 am

Re: borders at tchart

Post by Friis » Fri Apr 17, 2015 8:33 am

... and by the way - thank you for a VERY fast reply :D

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

Re: borders at tchart

Post by Narcís » Fri Apr 17, 2015 8:44 am

Hi Friis,

You're very welcome.

In that case this is the same problem discussed here.

Which in your case can be solved like this:

Code: Select all

      tChart1.Clear();

      tChart1.BackColor = Color.White;
      tChart1.Panel.Gradient.Visible = false;
      tChart1.Panel.Color = Color.White;
      tChart1.Aspect.View3D = false;
      tChart1.Walls.Visible = false;
      tChart1.Panel.Pen.Visible = false;
      tChart1.Panel.Bevel.Inner = Steema.TeeChart.Drawing.BevelStyles.None;
      tChart1.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;
      tChart1.Panel.Bevel.Width = 0;
      tChart1.Header.Text = "";
      tChart1.Legend.Visible = false;
            
      var bufferStyle = tChart1.Graphics3D.BufferStyle;
      tChart1.Graphics3D.BufferStyle = Steema.TeeChart.Drawing.BufferStyle.None;
      tChart1.Export.Image.Bitmap.Save(@"C:\Temp\jkhfw.bmp");
      tChart1.Graphics3D.BufferStyle = bufferStyle;
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

Friis
Newbie
Newbie
Posts: 26
Joined: Thu Oct 16, 2014 12:00 am

Re: borders at tchart

Post by Friis » Fri Apr 17, 2015 9:20 am

Super - this works fantastic ;-)

Post Reply