TeeChart.BackColor Property is not working...??

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
nitin
Newbie
Newbie
Posts: 51
Joined: Thu Aug 22, 2002 4:00 am

TeeChart.BackColor Property is not working...??

Post by nitin » Tue Feb 01, 2011 8:13 am

Hi,

I am using TeeChart dll version 4.0.2009.62332, in my application I was trying to set the background color of the Chart.
So in that process, I set the BackColor property of TeeChart to Transparent and after that setting, I am not able to set BackColor property to any other color by using property window as well as through code.
Could you please help me out with this issue.

Regards,
Nitin

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

Re: TeeChart.BackColor Property is not working...??

Post by Narcís » Tue Feb 01, 2011 8:59 am

Hi Nitin,

I could reproduce the issue here and added it (TF02015369) to the defect list to be investigated for next releases.
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:

Re: TeeChart.BackColor Property is not working...??

Post by Narcís » Wed Feb 02, 2011 2:56 pm

Hi Nitin,

We have been investigating the issue further and you should be using Panel.Transparent to set the transparency of the Chart Panel, which works fine as in this example:

Code: Select all

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

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

        tChart1.Panel.Gradient.Visible = false;
        tChart1.Panel.Transparent = true;

        tChart1.Click += new EventHandler(tChart1_Click);
      }

      void tChart1_Click(object sender, EventArgs e)
      {
        tChart1.Panel.Transparent = false;
        tChart1.Panel.Color = Color.Blue;
      }
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

nitin
Newbie
Newbie
Posts: 51
Joined: Thu Aug 22, 2002 4:00 am

Re: TeeChart.BackColor Property is not working...??

Post by nitin » Thu Feb 03, 2011 5:33 am

Hi Narcis,

Problem is I have changed the BackColor Property of TeeChart to Transparent using property window.
And after that I can't change it to some other color. I tired to change it to some other color in InitializeControl() method to SystemColor.Control and after that I can see the SystemColor.Control color set in property window, however when I tried to change the BackColor later in code to some other color it is not considering that and I can see while debuggin the application the Transparent color is comming as Name of the BackColor for the teechart. Same think is occuring in case if I set the teechart backcolor to transparent and even the panel and wall Transparent property set to True. i.e. the solution you told me.

you can duplicate this easily by setting the BackColor property to Transparent and later try to set it to other color by any mean.


Regards,
Nitin

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

Re: TeeChart.BackColor Property is not working...??

Post by Narcís » Thu Feb 03, 2011 11:01 am

Hi Nitin,

Have you tried removing that setting in Form1.Designer.cs? If the problem persists can you please attach a simple example project we can run "as-is" to reproduce the problem here?

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

nitin
Newbie
Newbie
Posts: 51
Joined: Thu Aug 22, 2002 4:00 am

Re: TeeChart.BackColor Property is not working...??

Post by nitin » Thu Feb 03, 2011 11:23 am

Narcis,

I am not able to attach file as maximum file sized allowed is 512 KB.
I tried by removing the line from the Designer in which backColor is set to Transparent but still not able to get the changed color.

have tried setting the BackColor to Transparent and then tried to set to any other color?

Thanks,
Nitin

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

Re: TeeChart.BackColor Property is not working...??

Post by Narcís » Thu Feb 03, 2011 11:56 am

Hi Nitin,

You don't need to include bin and lib folders, we have the TeeChart assembly here :wink:. Just files in the root project folder and Properties folder. Doing so you should get a much lighter package to upload.

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

nitin
Newbie
Newbie
Posts: 51
Joined: Thu Aug 22, 2002 4:00 am

Re: TeeChart.BackColor Property is not working...??

Post by nitin » Thu Feb 03, 2011 12:17 pm

Please find the attachement.
password = password

Thanks,
Nitin
Attachments
WindowsFormsApplication1.zip
(14.52 KiB) Downloaded 642 times

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

Re: TeeChart.BackColor Property is not working...??

Post by Narcís » Thu Feb 03, 2011 12:32 pm

Hi Nitin,

That's because you set the line below at design-time in Form1.Designer.cs. Removing it makes the application work.

Code: Select all

          this.tChart1.Panel.Brush.Color = System.Drawing.Color.Transparent;
Alternatively you can use the code below at run-time:

Code: Select all

        private void button1_Click(object sender, EventArgs e)
        {
          tChart1.Panel.Transparent = false;
          tChart1.Panel.Gradient.Visible = false;
          tChart1.Panel.Brush.Transparency = 0;
          tChart1.Panel.Color = Color.Green;
        }
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

nitin
Newbie
Newbie
Posts: 51
Joined: Thu Aug 22, 2002 4:00 am

Re: TeeChart.BackColor Property is not working...??

Post by nitin » Fri Feb 04, 2011 6:06 am

Thanks Narcis, this changes has sovled the issue.

Regards,
Nitin

Post Reply