I have a freeze of my application with the following code, with TChart TPointSeries on Windows 64 bits.
I've simplified as much as I could my project to reproduce the problem. I only have a form with a TButton and a TeeChart with a TPointSeries. On the button OnClick event I have the following code:
{******************************************************************************}
procedure TForm2.btnTestClick(Sender: TObject);
var
X1, Y1, X2 : double ;
begin
X1 := 10.5 ;
Y1 := 289 ;
X2 := ( 10.5 * 9.81 * 821 ) / ( 821 * 9.81 ) ;
Series1.AddXY( X1, Y1 ) ;
Series1.AddXY( X2, Y1 ) ;
end;
{******************************************************************************}
The problem occurs only with project built for Windows 64 bits bits, everything works well for Windows 32 bits.
The problem doesn't occur if I change the values of X2 formula, or if I replace the formula by it's result.
I need to have this code working for any values of X2 formula, as it is part of an engineering software with formula members as variables.
Can someone help for a solution ?
Thank you
I've added it to the public tracker: #2059.
Here a possible workaround:
Chart1.Axes.Bottom.Items.Automatic:=False;
Chart1.Axes.Bottom.Items.Clear;
Chart1.Axes.Bottom.Items.Add(X1, FormatFloat(Chart1.Axes.Bottom.AxisValuesFormat, X1));
Chart1.Axes.Bottom.Items.Add(X2, FormatFloat(Chart1.Axes.Bottom.AxisValuesFormat, X2));
Chart1.Axes.Bottom.SetMinMax(X1-0.5, X2+0.5);