End Point not showed on Axis

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Vivek
Newbie
Newbie
Posts: 9
Joined: Tue Mar 10, 2009 12:00 am
Contact:

End Point not showed on Axis

Post by Vivek » Sun Mar 22, 2009 2:18 pm

Please see the Bottom Axis.jpeg image, it’s the graph of one the feature from our application. Here We have added values to series from 1530 to 1624, the increment is auto increment. So the last label should be drawn as 1625. But its not the case many times the last label of on axis is not drawn. Same is the case for vertical axis(see the iLeft Axis.jpeg). The values are added from 186.071 to 242.113. I want to show the first and last value of on their respective axis

See Bottom Axis.jpeg and Left Axis.jpeg which i have uploaded.

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Mon Mar 23, 2009 11:42 am

Hi Vivek,

I think that the best solution to do this is to use Custom Axes Labels. Could you take a look at the demo at: Welcome !\Axes\Labels\Custom labels
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Vivek
Newbie
Newbie
Posts: 9
Joined: Tue Mar 10, 2009 12:00 am
Contact:

Lables are not getting added

Post by Vivek » Fri Apr 03, 2009 5:15 pm

I am adding a label to the bottom axis. When i add any label. TeeChart draws only label which i added. But when i dont add any label to bottom.Label.Items, teeChart draws all labels but not the maximum value label.

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

Post by Sandra » Mon Apr 06, 2009 10:19 am

Hello vivek,

I do a simple example for reproduce that Yeray's said and works correctly. Please you reproduce next code and change this, because we can reproduce exactly your problem here.

InitializeChart:

Code: Select all

        private Steema.TeeChart.Styles.Line line1;
        private void InitializeChart()
        {
            line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
            int[] values = { 1530, 1540, 1550, 1560, 1570, 1580, 1590, 1600, 1610, 1620, 1624};
            int[] values2 = { 186,191, 196, 201, 206, 211, 216,221,226,231,242 };
            line1.Add(values,values2);
            AddCustomLabels();
      
   
        }
Method AddCustomLabels:

Code: Select all

   private void AddCustomLabels()
        {
            int i;
            int j;
            i=1530;//Minimum ValueX.
            j = 186;//Minimum ValueY.
            while (i <1620)
            {
                tChart1.Axes.Bottom.Labels.Items.Add(i);
                i = i + 10;
            }
            
            while (j< 236)
            {
                tChart1.Axes.Left.Labels.Items.Add(j);
                j= j+ 5;
            }
            tChart1.Axes.Bottom.Labels.Items.Add(1624);//Add Maximum X Value.
            tChart1.Axes.Left.Labels.Items.Add(242);//Add Maximum Y Value.

            tChart1.Axes.Bottom.Labels.Separation = 1;
            tChart1.Axes.Left.Labels.Separation = 1;

            tChart1.Axes.Left.Labels.Font.Size = 8;
            tChart1.Axes.Bottom.Labels.Font.Size = 8;
            tChart1.Panel.MarginLeft = 5;
            
        }
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