Wrong X Axis displayed when legend has checkboxes

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
rloewy
Newbie
Newbie
Posts: 5
Joined: Thu Apr 07, 2011 12:00 am

Wrong X Axis displayed when legend has checkboxes

Post by rloewy » Sun Jan 08, 2012 7:41 pm

Hi,

I have a strange issue:

I have a chart with 2 series, and the legend has checkboxes.

When I display the chart with the normal stuff - the X-Axis is just fine.

If I uncheck both series, and then check again one of the series - the X-Axis loses it's normal formatting and shows the internal data-value of the X-Axis instead of my pre-defined x-axis values.

Any ideas?

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

Re: Wrong X Axis displayed when legend has checkboxes

Post by Yeray » Mon Jan 09, 2012 2:37 pm

Hi,

I'm trying to reproduce the problem with the following code but it shows the same labels in the bottom axis all the time:

Code: Select all

uses Series;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.Legend.CheckBoxes:=true;

  Chart1.AddSeries(TPointSeries).FillSampleValues();
  Chart1.AddSeries(TPointSeries).FillSampleValues();

  with Chart1.Axes.Bottom.Items do
  begin
    Clear;
    Add(0, '0');
    Add(2, '2');
    Add(5, '5');
    Add(8, '8');
    Add(9, '9');
    Add(15, '15');
    Add(19, '19');
    Add(24, '24');
  end;
end;
rloewy wrote:instead of my pre-defined x-axis values
The clue will probably be on how are you defining these labels.

If you still have problems with it, please, try to arrange a simple example project we can run as-is to reproduce the problem here.
Thanks in advance.
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