Bar Graph Scale

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
MikeTheLad
Newbie
Newbie
Posts: 65
Joined: Mon Jan 19, 2004 5:00 am

Bar Graph Scale

Post by MikeTheLad » Mon Jul 18, 2011 7:40 am

When I add the following:-

tChart1.Axes.Bottom.Automatic = false;
tChart1.Axes.Bottom.Maximum = 23;
tChart1.Axes.Bottom.Minimum = 0;

The bar for 0 and for 23 is cut in half, if I leave the axes as automatic the bars are then correct but I don't get a all values from 0 to 23 on the scale.

Any ideas?
Attachments
callsbyhour.jpg
callsbyhour.jpg (145.19 KiB) Viewed 5950 times

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

Re: Bar Graph Scale

Post by Sandra » Mon Jul 18, 2011 10:50 am

Hello MiketheLab,

I couldn't reproduce your problem using next code with last version of TeeChart.Net:

Code: Select all

private void InitializeChart()
{
           tChart1.Aspect.View3D = false;
            Steema.TeeChart.Styles.Bar bar = new Bar(tChart1.Chart);
            bar.Marks.Visible = false;
            bar.FillSampleValues(23);
            tChart1.Axes.Bottom.Automatic = false;
            tChart1.Axes.Bottom.Maximum = 23;
            tChart1.Axes.Bottom.Minimum = 0;
            tChart1.Axes.Bottom.Increment = 1;
            tChart1.Axes.Bottom.Labels.Items.Clear();
            for (int i = 0; i < bar.Count; i++)
            {
                tChart1.Axes.Bottom.Labels.Items.Add(bar.XValues[i], bar.XValues[i].ToString());

            }
}
Can you check if previous code works as you expected? On the other hand, you can tell us which version of TeeChart are you using, now?

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

MikeTheLad
Newbie
Newbie
Posts: 65
Joined: Mon Jan 19, 2004 5:00 am

Re: Bar Graph Scale

Post by MikeTheLad » Mon Jul 18, 2011 12:44 pm

If I try your code it does not work on current version which is pretty old V1

I have downloaded the 2011 version and it then works.

Do you offer an upgrade option or is it a whole new licence?

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

Re: Bar Graph Scale

Post by Narcís » Mon Jul 18, 2011 1:14 pm

Hi MikeTheLad,

No, there's an upgrade option from v1 which you can fine here: http://www.steema.com/order/net/u
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