Page 1 of 1

End Point not showed on Axis

Posted: Sun Mar 22, 2009 2:18 pm
by 13052775
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.

Posted: Mon Mar 23, 2009 11:42 am
by yeray
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

Lables are not getting added

Posted: Fri Apr 03, 2009 5:15 pm
by 13052775
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.

Posted: Mon Apr 06, 2009 10:19 am
by 10050769
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,