Page 1 of 1

Adding points with labels changes axis

Posted: Fri Feb 04, 2011 4:49 pm
by 16556545
I'm creating 2D scatter plots at runtime (since it's not known at designtime how many charts will be needed).

When I add points using AddXY without labels, the bottom axis looks fine, showing the scale of values (see top chart, attached).

But when I add points WITH labels, the bottom axis shows these labels instead of the usual scale of values (see bottom chart, attached), and vertical grid lines are drawn only at data points. But the left axis remains just fine.

I tried using the ChartEditor within my program, but I see no setting that affected this.

How do I make my bottom axis display correctly?

THANK YOU!

Re: Adding points with labels changes axis

Posted: Mon Feb 07, 2011 6:21 pm
by yeray
Hi Kevin,

By default, the axis LabelStyle is set to talAuto. This style shows the values when there are no labels in the series and the labels if present.
However, you can always force the axis to show the values or the series' labels:

Code: Select all

Chart1.Axes.Bottom.LabelStyle:=talValue;
In the editor: Chart/Axis (Bottom Axis)/Labels/Style/Style combobox.

Re: Adding points with labels changes axis

Posted: Mon Feb 14, 2011 10:13 pm
by 16556545
That did it. Thank you, Yeray!