Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2565 - Axis labels not drawn when the series hasn't labels and axis LabelStyle is talText
Summary: Axis labels not drawn when the series hasn't labels and axis LabelStyle is ta...
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Axis (show other bugs)
Version: 36.220929
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: yeray alonso
URL: https://www.steema.com/support/viewto...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-07 09:16 EST by yeray alonso
Modified: 2022-11-07 09:17 EST (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2022-11-07 09:16:23 EST
After the fix for #1899, no labels are drawn when having a series without labels and the bottom axis LabelStyle set to talText. Ie:

uses Series, TeeConst;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Caption:=TeeMsg_Version;

  with Chart1 do
  begin
    Color:=clWhite;
    Gradient.Visible:=False;
    Walls.Back.Color:=clWhite;
    Walls.Back.Gradient.Visible:=False;
    Legend.Hide;
    View3D:=False;

    with AddSeries(TBarSeries) do
    begin
      Marks.Hide;
      FillSampleValues(48);
    end;

    Axes.Bottom.LabelStyle:=talText;
    OnGetAxisLabel:=ChartGetAxisLabel;
  end;
end;

procedure TForm1.ChartGetAxisLabel(Sender: TChartAxis; Series: TChartSeries;
    ValueIndex: Integer; var LabelText: string);
begin
  if Sender.Horizontal and (ValueIndex<>-1) then
     LabelText:='Idx '+IntToStr(ValueIndex);
end;