TChart1.Axes.Bottom.Increment does not work

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

TChart1.Axes.Bottom.Increment does not work

Post by Neelam » Thu Nov 27, 2008 7:29 am

Hi
In the uploaded file,why button 2 does not work? uploaded teechartexample.zip.Thanks in advance.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Nov 27, 2008 9:56 am

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
Best Regards,
Narcís Calvet / 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

Neelam
Advanced
Posts: 193
Joined: Fri Jun 08, 2007 12:00 am

Post by Neelam » Thu Nov 27, 2008 2:38 pm

but it still does not work. uploaded updated teechartexample.zip.please let me know where i ma going wrong. thanks.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Nov 27, 2008 2:55 pm

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
Best Regards,
Narcís Calvet / 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