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 2550

Summary: Axis items format is lost after a repaint
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: AxisAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: enhancement CC: yeray
Priority: ---    
Version: 35.220329   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
URL: https://www.steema.com/support/viewtopic.php?f=3&t=17729
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description yeray alonso 2022-09-14 13:27:56 EDT
If you set the axis labels format and you create some custom labels (items), these items are drawn using the axis labels format at the first draw.
But the format is lost at the next repaints.

Ie:

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  with Chart1 do
  begin
    View3D:=False;
    Legend.Hide;
    Gradient.Visible:=False;
    Color:=clWhite;
    Walls.Back.Gradient.Visible:=False;
    Walls.Back.Color:=clWhite;
  end;

  with Chart1.Axes.Left do
  begin
    SetMinMax(0, 5);
    LabelsFont.Color:=clRed;

    for i:=0 to 4 do
        Items.Add(i, IntToStr(i));
  end;

  // Axis items color is lost after a repaint
  Chart1.Draw;
end;