Setting the Increment value of Axis not working.

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Neelam
Advanced
Posts: 193
Joined: Fri Jun 08, 2007 12:00 am

Setting the Increment value of Axis not working.

Post by Neelam » Wed Apr 04, 2012 5:22 pm

Hi,

I'm using Steema Silverlight version. I'm displaying a curve for each consecutive number on Bottom Axis. I've set
increment property of bottom Axis to 1 by using the following statment.
TeeChart.Axes.Bottom.Increment = 1;

But this is not working when number of values are large. Plz refer the attached screenshot. notice the gap between
13 & 15
18 & 20
23 & 25
28 & 30
Attachments
Bottom Axis values.PNG
Bottom Axis values.PNG (42.44 KiB) Viewed 6473 times

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

Re: Setting the Increment value of Axis not working.

Post by Sandra » Thu Apr 05, 2012 11:53 am

Hello Neelam,

I suggest use next code where I am using custom labels to draw all values:

Code: Select all

Steema.TeeChart.Silverlight.Style.Line Series1;
        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            Series1 = new Steema.TeeChart.Silverlight.Styles.Line(tChart1.Chart);
            Random rnd = new Random();
            for (int i = 0; i < 40; i++)
            {
                Series1.Add(i, rnd.Next(10000));
            }
            tChart1.Axes.Bottom.Labels.Style = AxisLabelStyle.PointValue;
            tChart1.Axes.Bottom.Labels.Angle = 90;
            AddLabels();
        }
        private void AddLabels()
        {
            tChart1.Axes.Bottom.Labels.Items.Clear();
            for(int i=0; i< Series1.Count;i++)
            {
                tChart1.Axes.Bottom.Labels.Items.Add(i, i.ToString());
            }
        }
Can you tell us if previous code solve your problem?

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