Axis title's visibility tied to axis labels' visibility?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
JayG
Newbie
Newbie
Posts: 71
Joined: Mon Sep 04, 2006 12:00 am

Axis title's visibility tied to axis labels' visibility?

Post by JayG » Wed May 09, 2012 9:23 pm

Using TeeChart .NET 4.1.2012.02280

If none of the series assigned to a certain vertical axis are visible, the axis labels and tick marks disappear automatically. Is there a way to have the axis title disappear automatically in this situation also?

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Axis title's visibility tied to axis labels' visibility?

Post by Sandra » Thu May 10, 2012 11:59 am

Hello JayG,

If you don't assign series to the certain vertical axis, the title, labels and tick marks of axes, don't appear. It works for me using last version and next code:

Code: Select all

      private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            Steema.TeeChart.Styles.Line line1 = new Line(tChart1.Chart);
            line1.FillSampleValues(); 
            //Axes
            tChart1.Axes.Left.Title.Visible = true;
            tChart1.Axes.Left.Title.Text = "Axies Left";
           

        }

        private void button1_Click(object sender, EventArgs e)
        {
            tChart1[0].VertAxis = VerticalAxis.Right;
        }
Can you please modify previous code so we can reproduce your problem here?

Thanks,
Best Regards,
Sandra Pazos / 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

JayG
Newbie
Newbie
Posts: 71
Joined: Mon Sep 04, 2006 12:00 am

Re: Axis title's visibility tied to axis labels' visibility?

Post by JayG » Thu May 10, 2012 3:42 pm

Change the code in the button1_Click procedure:

Code: Select all

          private void InitializeChart()
            {
                tChart1.Aspect.View3D = false;
                Steema.TeeChart.Styles.Line line1 = new Line(tChart1.Chart);
                line1.FillSampleValues();
                //Axes
                tChart1.Axes.Left.Title.Visible = true;
                tChart1.Axes.Left.Title.Text = "Axis Left";
               

            }

            private void button1_Click(object sender, EventArgs e)
            {
                tChart1[0].Visible = false;
            }
After clicking the button, the left axis title remains visible, even though the scale and labels disappear.

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Axis title's visibility tied to axis labels' visibility?

Post by Sandra » Fri May 11, 2012 1:58 pm

Hello JayG,

Thanks for information. The only solution as you have is setting the Title of Axes when you do invisible your series. You can do something as next:

Code: Select all

tChart1.Axes.Left.Title.Visible = false;
Can you tell us if it solve your problem? If it doesn't help you please let me know.

Thanks,
Best Regards,
Sandra Pazos / 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