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 - TChart's SeriesUp changes TChartAxis' IsDateTime result
Summary: TChart's SeriesUp changes TChartAxis' IsDateTime result
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Axis (show other bugs)
Version: 33.210915
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: yeray alonso
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-04 08:52 EST by yeray alonso
Modified: 2022-01-04 08:57 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-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;