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 2497

Summary: TChart's SeriesUp changes TChartAxis' IsDateTime result
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: AxisAssignee: yeray alonso <yeray>
Status: RESOLVED FIXED    
Severity: enhancement CC: yeray
Priority: ---    
Version: 33.210915   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description yeray alonso 2022-01-04 08:52:58 EST
TChart's SeriesUp method changes the TChartAxis' IsDateTime result.
Ie:

procedure TForm1.FormCreate(Sender: TObject);
var i, j: Integer;
begin
  for i:=0 to 1 do
    with Chart1.AddSeries(TLineSeries) do
    begin
      XValues.DateTime:=i=0;

      for j:=0 to 5 do
        AddXY(IncMonth(Today.StartOfTheMonth,j), (i+1)*20);
    end;

  Chart1.Axes.Left.SetMinMax(0,60);
  Chart1.Axes.Bottom.Increment:=DateTimeStep[dtOneMonth];
  Chart1.Axes.Bottom.DateTimeFormat:='mm/yy';
  // all is OK at this point
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  // this causes Bottom Axis.IsDateTime to change from True to False
  ShowMessage('IsDateTime = ' + BoolToStr(Chart1.axes.Bottom.IsDateTime,True));
  Chart1.SeriesUp(Chart1[1]);
  ShowMessage('IsDateTime = ' + BoolToStr(Chart1.axes.Bottom.IsDateTime,True));
end;