Adding points with labels changes axis

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
KevinKillion
Newbie
Newbie
Posts: 11
Joined: Wed Jul 07, 2010 12:00 am

Adding points with labels changes axis

Post by KevinKillion » Fri Feb 04, 2011 4:49 pm

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!
Attachments
using label changes axis.JPG
using label changes axis.JPG (146.58 KiB) Viewed 3583 times

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

Re: Adding points with labels changes axis

Post by Yeray » Mon Feb 07, 2011 6:21 pm

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.
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

KevinKillion
Newbie
Newbie
Posts: 11
Joined: Wed Jul 07, 2010 12:00 am

Re: Adding points with labels changes axis

Post by KevinKillion » Mon Feb 14, 2011 10:13 pm

That did it. Thank you, Yeray!

Post Reply