Page 1 of 1

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

Posted: Tue Jun 09, 2009 12:13 pm
by 13047002
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

Posted: Tue Jun 09, 2009 1:30 pm
by yeray
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.

Posted: Tue Jun 09, 2009 1:51 pm
by 13047002
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

Posted: Tue Jun 09, 2009 3:53 pm
by yeray
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.