logarithmic axes problem

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Richard
Newbie
Newbie
Posts: 40
Joined: Mon May 21, 2001 4:00 am

logarithmic axes problem

Post by Richard » Thu Jun 03, 2010 9:00 am

I want Bottom axes like this picture.
Image

And this my setting:
logarithmic is true, Log base is 10, and inverted is true.
But I get this chart.
Image

Is there any way to change the width?
Please tell me.

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

Re: logarithmic axes problem

Post by Narcís » Thu Jun 03, 2010 11:22 am

Hi Richard,

I'm afraid the only solution is that you manually add desired labels to data points when populating series or manually parse labels in the GetAxisLabel event as shown here:

Code: Select all

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

        private void InitializeChart()
        {            
            tChart1.Aspect.View3D = false;

            Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);

            for (int i = 0; i < 100; i++)
            {
                line1.Add(i * i, Convert.ToString(Math.Pow(10, i) / 1000));
            }

            tChart1.Axes.Bottom.Inverted = true;
            tChart1.GetAxisLabel += new Steema.TeeChart.GetAxisLabelEventHandler(tChart1_GetAxisLabel);
        }

        void tChart1_GetAxisLabel(object sender, Steema.TeeChart.GetAxisLabelEventArgs e)
        {
            //if (sender.Equals(tChart1.Axes.Bottom))
            //{
            //    e.LabelText = Convert.ToString(Math.Pow(10, e.ValueIndex) / 1000);
            //}
        }
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

Richard
Newbie
Newbie
Posts: 40
Joined: Mon May 21, 2001 4:00 am

Re: logarithmic axes problem

Post by Richard » Thu Jun 17, 2010 2:46 am

Hi, Narcís
Thanks your help.
The problem has been solved after I used older version.

Post Reply