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 - Axis items format is lost after a repaint
Summary: Axis items format is lost after a repaint
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Axis (show other bugs)
Version: 35.220329
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL: https://www.steema.com/support/viewto...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-14 13:27 EDT by yeray alonso
Modified: 2022-09-14 13:28 EDT (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-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;