Labels dissapear on Y axis, even when there is enough space

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Luke
Newbie
Newbie
Posts: 68
Joined: Thu Oct 11, 2007 12:00 am

Labels dissapear on Y axis, even when there is enough space

Post by Luke » Tue Jun 09, 2009 12:13 pm

I am sometime only getting alternate labels being displayed on the Y axis.

There is enough room and this makes no sense at all. Its similar to the Bottm axis this also displayed weird behaviour when resizing.

This is with the latest version of the .net dlls

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

Post by Yeray » Tue Jun 09, 2009 1:30 pm

Hi Luke,

I couldn't reproduce the issue with the following code:

Code: Select all

new Points(tChart1.Chart);
tChart1[0].FillSampleValues(25);
tChart1.Axes.Left.Labels.Alternate = true;
Please, could you modify the code above or send us a simple example project we can run "as-is" to reproduce the problem here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
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

Luke
Newbie
Newbie
Posts: 68
Joined: Thu Oct 11, 2007 12:00 am

Post by Luke » Tue Jun 09, 2009 1:51 pm

Create 2 HorizBar Series

Add 2 each 5 values

hb1.add(0.23,"Value1")
hb1.add(0.25,"Value2")
hb1.add(0.26,"Value3")
hb1.add(0.27,"Value4")
hb1.add(0.29,"Value5")
hb2.add(1.23,"Value1")
hb2.add(1.25,"Value2")
hb2.add(1.26,"Value3")
hb2.add(1.27,"Value4")
hb2.add(1.29,"Value5")

the labels are same for each but sometimes dissapear on resizing

the only wy I could get this to work was by adding the points then adding labels to the left axis

hb1.add(0.23)
hb1.add(0.25)
hb1.add(0.26)
hb1.add(0.27)
hb1.add(0.29)
hb2.add(1.23)
hb2.add(1.25)
hb2.add(1.26)
hb2.add(1.27)
hb2.add(1.29)


chart.Axes.Left.Labels.Items.Add(0,"Value1")
chart.Axes.Left.Labels.Items.Add(0,"Value2") etc

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

Post by Yeray » Tue Jun 09, 2009 3:53 pm

Hi Luke,

Yes, I've seen that for some chart heights, having an HorizBar series with labels and the left axis set as alternate and with style as text, the labels space probably isn't calculated correctly. So I've added it to the wish list to be fixed in further releases (TV52014229).

So probably the best workaround would be using custom labels as you found.

Also note that here if I set a chart height of 522, your code shows correct 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

Post Reply