Page 1 of 1

TChart1.Axes.Bottom.Increment does not work

Posted: Thu Nov 27, 2008 7:29 am
by 13045482
Hi
In the uploaded file,why button 2 does not work? uploaded teechartexample.zip.Thanks in advance.

Posted: Thu Nov 27, 2008 9:56 am
by narcis
Hi shikha,

Your example uses series labels as bottom axis labels. For Increment to work you need to set bottom axis labels style as shown here:

Code: Select all

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Bar1.Add(3, "Pears", Color.Red)
        Bar1.Add(4, "Apples", Color.Blue)
        Bar1.Add(2, "Oranges", Color.Green)

        TChart1.Axes.Bottom.Labels.Style = Steema.TeeChart.AxisLabelStyle.Value
    End Sub

Posted: Thu Nov 27, 2008 2:38 pm
by 13045482
but it still does not work. uploaded updated teechartexample.zip.please let me know where i ma going wrong. thanks.

Posted: Thu Nov 27, 2008 2:55 pm
by narcis
Hi shikha,

Increment is set to 27 but axis scaling is automatic. Since your bars are at X=0,1 and 2 bottom axis range goes from 0 to 2. As Increment=27 only 0 label is displayed. If you want to see 0 and 27 labels you need to manually set bottom axis range like this:

Code: Select all

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

    TChart1.Axes.Bottom.Increment = 27
    TChart1.Axes.Bottom.SetMinMax(0, 27)
    End Sub