Page 1 of 1

Setting the Increment value of Axis not working.

Posted: Wed Apr 04, 2012 5:22 pm
by 13045482
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

Re: Setting the Increment value of Axis not working.

Posted: Thu Apr 05, 2012 11:53 am
by 10050769
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,